POSTapi.synup.com/api/v4/social-post-ideas/link-post-idea-to-social-post
Link post idea to social post
Links a generated post idea to a published social post, so the idea is marked as used and tracked against the social post.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Synup-Version | string | required | API version date (YYYY-MM-DD). |
Body
| Name | Type | Required | Description |
|---|---|---|---|
postIdeaId | string | required | |
socialPostId | string | required |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/social-post-ideas/link-post-idea-to-social-post' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"postIdeaId": "91b2...",
"socialPostId": "5d7e..."
}'const res = await fetch('https://api.synup.com/api/v4/social-post-ideas/link-post-idea-to-social-post', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"postIdeaId": "91b2...",
"socialPostId": "5d7e..."
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/social-post-ideas/link-post-idea-to-social-post",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"postIdeaId": "91b2...",
"socialPostId": "5d7e..."
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/social-post-ideas/link-post-idea-to-social-post", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
401 | Unauthorized - Invalid or missing API key |
Example response (generated from the schema)
{
"data": {
"linkPostIdeaToSocialPost": {
"success": true,
"error": {
"message": "string",
"code": "string",
"contextInfo": [
{
"key": "string",
"value": "string"
}
]
}
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.linkPostIdeaToSocialPost | object | optional | |
data.linkPostIdeaToSocialPost.success | boolean | optional | |
data.linkPostIdeaToSocialPost.error | object | optional | |
data.linkPostIdeaToSocialPost.error.message | string | optional | |
data.linkPostIdeaToSocialPost.error.code | string | optional | |
data.linkPostIdeaToSocialPost.error.contextInfo | array of object | optional | |
data.linkPostIdeaToSocialPost.error.contextInfo[].key | string | optional | |
data.linkPostIdeaToSocialPost.error.contextInfo[].value | string | optional |