curl --request POST \
--url https://api.social-api.ai/v1/migrations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"authorisation_version": "<string>",
"key": "<string>",
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', '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": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assessed_at": "<string>",
"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": "<string>",
"base_url": "https://z.social-api.ai/api",
"created_at": "<string>",
"cut_over": 123,
"forwarded_calls": 123,
"key_hint": "<string>",
"started": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}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.
curl --request POST \
--url https://api.social-api.ai/v1/migrations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"authorisation_version": "<string>",
"key": "<string>",
"provider": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', '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": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"assessed_at": "<string>",
"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": "<string>",
"base_url": "https://z.social-api.ai/api",
"created_at": "<string>",
"cut_over": 123,
"forwarded_calls": 123,
"key_hint": "<string>",
"started": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Body
Provider, key and accepted authorisation version
Version of the authorisation text you accepted, as returned in authorisation.version.
API key from your account with that provider. It needs read access to profiles and accounts.
Identifier of the provider you are moving from.
Response
Created
When the accounts were last read, RFC 3339. Null until the first read succeeds.
Your accounts and how they map to SocialAPI. Null until started, or when your provider could not be read.
Show child attributes
Show child attributes
Why assessment is null on a started migration: migration.key_invalid, migration.key_restricted or migration.source_unavailable.
Text to accept before starting, and its version.
Show child attributes
Show child attributes
Version of the authorisation text accepted. Null until started.
When the authorisation was accepted, RFC 3339. Null until started.
Base URL to set in your existing client. Null until started.
"https://z.social-api.ai/api"
When the migration started, RFC 3339. Null until started.
Accounts already reconnected to SocialAPI.
Requests sent through the base URL since the migration started.
Start and end of the key in use. Null until started.
True once a migration has started.