Create a Queue
curl --request POST \
--url https://api.social-api.ai/v1/queues \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "<string>",
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"active": true,
"is_default": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
brand_id: '<string>',
name: 'Evenings',
slots: [{day: 'tuesday', time: '19:00'}],
timezone: 'Europe/Paris',
active: true,
is_default: false
})
};
fetch('https://api.social-api.ai/v1/queues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/queues"
payload = {
"brand_id": "<string>",
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"active": True,
"is_default": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"brand_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "que_01J9Z8Y7X6W5V4T3S2R1Q0P9N8",
"is_default": true,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Queues
Create a Queue
Creates a Queue on a Brand: a weekly list of posting times in one timezone. A post created with queue_id takes the earliest free time. day is a lowercase English weekday name and time is HH:MM, both in the Queue’s timezone. A Brand holds at most 20 Queues and always has exactly one default. The first Queue of a Brand becomes its default, and is_default: true makes this one the default.
POST
/
queues
Create a Queue
curl --request POST \
--url https://api.social-api.ai/v1/queues \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "<string>",
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"active": true,
"is_default": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
brand_id: '<string>',
name: 'Evenings',
slots: [{day: 'tuesday', time: '19:00'}],
timezone: 'Europe/Paris',
active: true,
is_default: false
})
};
fetch('https://api.social-api.ai/v1/queues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/queues"
payload = {
"brand_id": "<string>",
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"active": True,
"is_default": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"brand_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "que_01J9Z8Y7X6W5V4T3S2R1Q0P9N8",
"is_default": true,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Authorizations
Body
application/json
Queue definition
Response
Created