{"openapi":"3.0.0","info":{"title":"Channels API","description":"Manages communication channels within Dotdigital Personalization. Channels represent the delivery surfaces (such as email, web, or mobile) through which personalised content is served. This API provides operations to list all configured channels and to retrieve the details of a specific channel by identifier.","version":"1.0.1"},"servers":[{"url":"https://{region}-api-freshrelevance.dotdigital.com/api","variables":{"region":{"description":"The region id your account belongs to","enum":["r1","r2","r3"],"default":"r1"}}}],"security":[{"apiTokenAuth":[]}],"paths":{"/{website_id}/channels/":{"get":{"tags":["Manage channels"],"summary":"List channels","description":"Retrieves a list of channels for the website/account.","operationId":"getListChannels","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1}],"responses":{"200":{"description":"The page of channel data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200"},"examples":{"success":{"value":{"links":{"next":"https://api.freshrelevance.com/api/abc1234/channels/?format=json&limit=10&page=2"},"count":473,"total":473,"page":1,"results":[{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"CustomDataTableFtpImport:lcv1vak"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"DataRequestsDotMailerV3"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"DataRequestsEloqua"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"DataRequestsFtp"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"DataRequestsMessageFocus"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"DataRequestsOmetria"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"EspAcousticV4:ae85b80"},{"website_id":"abc1234","ftp_field_mapping":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}","channel_id":"EspAcousticV4:bo54k3f"}],"headers":{"website_id":"Website ID","ftp_field_mapping":"FTP Field Mapping","channel_id":"Channel ID"}}}}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}},"/{website_id}/channels/{channel_id}/":{"get":{"tags":["Manage channels"],"summary":"Get channel","description":"Retrieves the details of a channel for the website/account.","operationId":"getChannel","parameters":[{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},{"name":"channel_id","in":"path","description":"The channel identifier you want to reference.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The page of channel data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/individualChannelDetails"}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"description":"Unauthorized"},"403":{"$ref":"#/components/responses/403Response"}}}}},"components":{"schemas":{"channelDetails":{"required":["channel_id","ftp_field_mapping","website_id"],"type":"object","properties":{"website_id":{"type":"string","description":"The Dotdigital Personalization webisite/account the channel is configured on.","example":"abc1234"},"ftp_field_mapping":{"type":"string","description":"The field mapping to use to map unique identifiers for visitors for the channel as a JSON string.","format":"json","example":"{\"email\":{\"ftp_field_name\":\"email\"},\"eid\":{\"ftp_field_name\":\"id\"}}"},"channel_id":{"type":"string","description":"The unique channel identifier","nullable":true,"example":"DataRequestsDotMailerV3"}},"description":"Channel details"},"individualChannelDetails":{"allOf":[{"$ref":"#/components/schemas/channelDetails"},{"type":"object","properties":{"service_paused_flag":{"type":"boolean","description":"If enabled the channel will be paused and stop all processing.","example":false}}}]},"PaginatedData":{"required":["count","links","page","total"],"type":"object","properties":{"page":{"minimum":1,"type":"integer","description":"The index for the page of data returned.","example":1},"count":{"minimum":0,"type":"integer","description":"Number of records in the page.","example":12},"total":{"minimum":0,"type":"integer","description":"Total number of records in the set.","example":12},"links":{"$ref":"#/components/schemas/PaginatedData_links"}},"description":"Data page and pagination links"},"inline_response_200":{"allOf":[{"$ref":"#/components/schemas/PaginatedData"},{"required":["headers","results"],"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/channelDetails"}},"headers":{"$ref":"#/components/schemas/inline_response_200_headers"}},"description":"The channel details."}]},"PaginatedData_links":{"type":"object","properties":{"next":{"type":"string","description":"URL of the next page.","format":"url","nullable":true},"previous":{"type":"string","description":"URL of the previous page.","format":"url","nullable":true}},"description":"Page navigation links"},"inline_response_200_headers":{"required":["channel_id","ftp_field_mapping","website_id"],"type":"object","properties":{"website_id":{"type":"string","description":"The terminolgy to use for this."},"ftp_field_mapping":{"type":"string","description":"The terminolgy to use for this."},"channel_id":{"type":"string","description":"The terminolgy to use for this."}},"additionalProperties":true,"description":"Key terminolgy mappings."}},"responses":{"ErrorResponse":{"description":"An error occurred","content":{"application/json":{"schema":{"required":["error","ok"],"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates the call failed","enum":[false]},"error":{"oneOf":[{"type":"string","description":"The reason the call errored","example":"Validation error. No folder bd8eciompb7y, unable to delete"},{"type":"object","additionalProperties":{"minItems":1,"type":"array","items":{"type":"string","example":"This field may not be null."}},"description":"Fields with issues and their errors"}]}}}}}},"403Response":{"description":"Forbidden - Usually you are requesting data for a website you don't have access to."}},"parameters":{"WebsiteId":{"name":"website_id","in":"path","description":"Website ID for the account you are posting data to.","required":true,"schema":{"type":"string"},"example":"abc123"},"FormatJson":{"name":"format","in":"query","description":"Get data in JSON format.","required":true,"schema":{"type":"string","enum":["json"]},"example":"json"},"Limit":{"name":"limit","in":"query","description":"Get this number of records to return in results array (pagination).","schema":{"minimum":1,"type":"integer","default":25},"example":50},"Page":{"name":"page","in":"query","description":"Which page of results you wish to return; First page is indexed as 1.","schema":{"type":"integer","default":1},"example":1}},"securitySchemes":{"apiTokenAuth":{"type":"apiKey","name":"x-api-key","in":"header"}}},"x-samples-languages":["curl","csharp","java","javascript","node","python","php","ruby"]}