Run an account action
Run one of an account's network-specific actions, for example create a Pinterest board or refresh its list of boards.
The action runs against the network while your request waits, using the account's own quota with that network. Get the action names and their input from List account actions.
Rate limit: 30 runs per minute for each user and 120 per minute for each workspace. Over the limit the API returns 429 with a Retry-After header, see Errors and rate limits.
Request
- Method:
POST - URL:
https://app.socialk.it/core/api/<workspaceUuid>/accounts/<accountUuid>/actions/<action> - Authorization:
Bearer <personal-key> - Roles: Admin, Member (see Permissions)
Path parameters
| Parameter | Type | Description |
|---|---|---|
workspaceUuid | string | UUID of the workspace. |
accountUuid | string | UUID of the account. |
action | string | Name of the action, for example create-board. |
Body
Send the action's input as top-level JSON fields. Actions without input take no body. The fields below are for create-board, the only action with input today.
{
"name": "Recipes",
"description": "Things to cook",
"privacy": "SECRET"
}| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Board name, up to 100 characters. |
description | string | No | Board description, up to 500 characters. |
privacy | string | No | PUBLIC or SECRET. Default PUBLIC. Only the account and the people it invites to the board can see a SECRET board. |
Example
curl -X POST 'https://app.socialk.it/core/api/<workspaceUuid>/accounts/<accountUuid>/actions/create-board' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <personal-key>' \
-d '{"name": "Recipes", "description": "Things to cook", "privacy": "SECRET"}'Response
The result of the action is returned under data. Both Pinterest actions save the boards on the account too, so you can use the returned board IDs at once as the Pinterest board of a post.
{
"data": {
"board": {
"id": "1022106146609620000",
"name": "Recipes"
}
}
}A 422 without errors means the network refused the action; message gives the reason. When the network no longer accepts the account's authorization, SocialKit marks the account as unauthorized (authorized is false) and you must reconnect it in the dashboard.