Start a migration
curl --request POST \
--url https://api.social-api.ai/v1/migrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorisation_version": "<string>",
"key": "<string>",
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({authorisation_version: '<string>', key: '<string>', provider: '<string>'})
};
fetch('https://api.social-api.ai/v1/migrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/migrations"
payload = {
"authorisation_version": "<string>",
"key": "<string>",
"provider": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assessed_at": "2023-11-07T05:31:56Z",
"assessment": {
"brands": 123,
"pages_per_brand": 123,
"profiles": [
{
"brands": 123,
"id": "<string>",
"name": "<string>",
"pages_per_brand": 123,
"servable_accounts": 123,
"splits": [
"<string>"
]
}
],
"recommended_plan": {
"brands_limit": 123,
"name": "<string>",
"pages_per_brand": 123,
"tier": "starter"
},
"servable_accounts": 123,
"stays_with_provider": [
{
"count": 123,
"platform": "<string>",
"reason": "<string>"
}
]
},
"assessment_error": "<string>",
"authorisation": {
"text": "<string>",
"version": "<string>"
},
"authorisation_version": "<string>",
"authorised_at": "2023-11-07T05:31:56Z",
"base_url": "https://z.social-api.ai/api",
"created_at": "2023-11-07T05:31:56Z",
"cut_over": 123,
"forwarded_calls": 123,
"key_hint": "<string>",
"started": true
}{
"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"
}Migration
Start a migration
Starts a migration from another provider with an API key from your account there, and returns the first assessment of your accounts. Calling it again replaces the key. You must accept the current authorisation text: send its version from GET /v1/migrations/{provider}. Dashboard sessions only; API keys get 403.
POST
/
migrations
Start a migration
curl --request POST \
--url https://api.social-api.ai/v1/migrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorisation_version": "<string>",
"key": "<string>",
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({authorisation_version: '<string>', key: '<string>', provider: '<string>'})
};
fetch('https://api.social-api.ai/v1/migrations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/migrations"
payload = {
"authorisation_version": "<string>",
"key": "<string>",
"provider": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assessed_at": "2023-11-07T05:31:56Z",
"assessment": {
"brands": 123,
"pages_per_brand": 123,
"profiles": [
{
"brands": 123,
"id": "<string>",
"name": "<string>",
"pages_per_brand": 123,
"servable_accounts": 123,
"splits": [
"<string>"
]
}
],
"recommended_plan": {
"brands_limit": 123,
"name": "<string>",
"pages_per_brand": 123,
"tier": "starter"
},
"servable_accounts": 123,
"stays_with_provider": [
{
"count": 123,
"platform": "<string>",
"reason": "<string>"
}
]
},
"assessment_error": "<string>",
"authorisation": {
"text": "<string>",
"version": "<string>"
},
"authorisation_version": "<string>",
"authorised_at": "2023-11-07T05:31:56Z",
"base_url": "https://z.social-api.ai/api",
"created_at": "2023-11-07T05:31:56Z",
"cut_over": 123,
"forwarded_calls": 123,
"key_hint": "<string>",
"started": true
}{
"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
Provider, key and accepted authorisation version
Response
Created