Skip to main content
PUT
/
channels
Upsert channels
curl --request PUT \
  --url https://api.example.com/channels
{
  "data": {
    "created": 1,
    "updated": 1
  }
}
Creates or updates one or more channels for the authenticated merchant. Use this endpoint to sync channel names, status, and CMS template assignments from your operational stack into Fire spark. Each array element is matched by id. When no channel exists with that id for the merchant, Fire spark creates it. When one already exists, Fire spark updates the writable fields below. Omitted fields keep their current values on update.
Requires an access token with the channels:write scope. See Authorize to obtain a token.
Channel id values are immutable. You cannot change an existing channel’s id through this endpoint — send the same id on every sync.

Request

Send a JSON array. Each element represents one channel. Include id on every element — it is the stable external identifier and the upsert key. It cannot be changed after the channel is created.
curl -X PUT "https://firespark.vercel.app/api/integrations/v1/channels" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "id": "app",
      "name": "Mobile app",
      "status": "ACTIVE",
      "cms_template_id": "d4e5f6a7-b8c9-0123-def4-567890abcdef"
    },
    {
      "id": "uber-eats",
      "name": "Uber Eats",
      "status": "ACTIVE",
      "cms_template_id": null
    }
  ]'

Request fields

FieldTypeDescription
idstringRequired. External channel identifier. Alphanumeric characters, _, and - only. 1–64 characters. Unique per merchant. Used as the upsert key. Cannot be changed after the channel is created.
namestringDisplay name. 1–100 characters.
statusstringACTIVE or INACTIVE.
cms_template_idstring (UUID)CMS template to assign to the channel. Omit to keep the current value on update, or set null to remove the template. Must reference a template with entity CHANNELS.
cms is read-only on channel responses. You can assign or clear a template with cms_template_id, but you cannot write CMS field values through this endpoint.

Response

{
  "data": {
    "created": 1,
    "updated": 1
  }
}

Error responses

StatusDescription
400Request body failed validation. Check field constraints above.
401Missing or invalid access token.
403Token does not include the channels:write scope.
422Business rule violation — for example attempting to change a channel id, or duplicate id or name for the merchant.
Validation error
{
  "error": "validation_error",
  "message": "name: Name must be between 1 and 100 characters"
}