Skip to main content

Update Market

Update an existing market.

Endpoint: PUT /api/v1/integration/markets/{id}

Authentication: Required (Bearer token)

Required Headers:

Authorization: Bearer <access_token>
X-Target-Server: integration

Path Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesMarket ID

Request Body

All fields are optional. Only include the fields you want to update. The webhook field is optional - you can update it, remove it, or leave it unchanged.

Update with Webhook:

{
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
}
}

Update without Webhook (remove webhook):

{
"domain": "updated-domain.com",
"webhook": null
}

Update only domain (keep existing webhook):

{
"domain": "updated-domain.com"
}

Request Parameters

FieldTypeRequiredDescription
domainstringNoMarket domain
webhookobject | nullNoWebhook configuration (optional, set to null to remove)
webhook.hoststringNoWebhook host URL
webhook.pathstringNoWebhook path
webhook.methodintegerNoHTTP method (1=GET, 2=POST, etc.)
webhook.authenticationobjectNoAuthentication configuration
webhook.authentication.typeintegerNoAuthentication type (1=Basic, 2=Token)
webhook.authentication.usernamestringNoUsername (required if type=1)
webhook.authentication.passwordstringNoPassword (required if type=1)
webhook.timeoutintegerNoRequest timeout in seconds

Response

Status: 200 OK

Returns the updated market object.

{
"id": "262bed05-5a0e-4fff-8171-39fafab66b0c",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": "GET",
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
},
"created_at": "2025-12-11T14:00:26.023564Z",
"updated_at": "2025-12-11T14:03:47.361795Z"
}

Example cURL Request

curl -X PUT 'https://<base-url>/api/v1/integration/markets/262bed05-5a0e-4fff-8171-39fafab66b0c' \
-H "Content-Type: application/json" \
-H "X-Target-Server: integration" \
-H "Authorization: Bearer <access_token>" \
-d '{
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
}
}'