Nuvelics documentation
APIAPI reference

Social connections

Connect your organization's social media accounts, and list the accounts a post can be published to.

GET
/api/tenant/v1/social-publish-targets

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Query Parameters

outputId*string

Story output identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

Every X connection of the organization, as a publish target for the output, each with whether it can be published to now, and what the output's claim check would do to a publish.

application/json
  1. response
items*array<>
claimCheck*

What the claim check would do to a publish of this output right now: the reason it would be refused, if any

media*

Why the post, its text, images or clip, keeps it from being published right now; null when nothing does

Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/social-publish-targets?outputId=string'
Example Response
{  "items": [    {      "kind": "x",      "id": "string",      "displayName": "string",      "handle": "string",      "availability": "ready",      "publishedAt": "2019-08-24T14:15:22Z",      "publishId": "string",      "claimedAt": "2019-08-24T14:15:22Z"    }  ],  "claimCheck": {    "blocked": "open_findings",    "openCount": 0,    "unchecked": true  },  "media": {    "reason": "text_dismissed_quote",    "card": 0  }}
GET
/api/tenant/v1/social-connections

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Response Body

Every social connection configured for the organization.

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/social-connections'
Example Response
{  "items": [    {      "id": "string",      "orgId": "string",      "platform": "string",      "credentialId": "string",      "displayName": "string",      "handle": "string",      "accountDisplayName": "string",      "scopes": "string",      "connectedAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "refreshFailedAt": "2019-08-24T14:15:22Z",      "grantedBy": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ]}

Get a social connection

GET
/api/tenant/v1/social-connections/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Social connection identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

The social connection

application/json
  1. response
id*string

Social connection identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string

Owning organization identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
platform*string

OAuth provider registry id this connection was made against (e.g. x)

Length1 <= length
credentialId*string

Reference to the stored credential holding this connection's tokens

displayName*string

Org-admin-editable display name for this connection

Length1 <= length
handle*string

The connected account's handle, snapshotted at connect/reconnect time

accountDisplayName*string

The connected account's own display name, snapshotted at connect/reconnect time

scopes*string

Space-delimited scopes actually granted at consent time

connectedAt*string

ISO 8601 timestamp of the first connect (never touched by a reconnect)

Formatdate-time
expiresAt*string

ISO 8601 expiry of the current access token -- refreshed on use, so this advances on every successful resolve; a stale value with a set refreshFailedAt means the connection is dead until Reconnect

Formatdate-time
refreshFailedAt*string

ISO 8601 timestamp of the most recent failed refresh attempt, or null if the last refresh (or the connection's initial token exchange) succeeded

Formatdate-time
grantedBy*string

The member who most recently completed this connection's consent

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
updatedAt*string

ISO 8601 last-modified timestamp

Formatdate-time
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/social-connections/string'
Example Response
{  "id": "string",  "orgId": "string",  "platform": "string",  "credentialId": "string",  "displayName": "string",  "handle": "string",  "accountDisplayName": "string",  "scopes": "string",  "connectedAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "refreshFailedAt": "2019-08-24T14:15:22Z",  "grantedBy": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/api/tenant/v1/social-connections/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Social connection identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
displayName*string
Length1 <= length

Response Body

Social connection updated

application/json
  1. response
id*string

Social connection identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
orgId*string

Owning organization identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
platform*string

OAuth provider registry id this connection was made against (e.g. x)

Length1 <= length
credentialId*string

Reference to the stored credential holding this connection's tokens

displayName*string

Org-admin-editable display name for this connection

Length1 <= length
handle*string

The connected account's handle, snapshotted at connect/reconnect time

accountDisplayName*string

The connected account's own display name, snapshotted at connect/reconnect time

scopes*string

Space-delimited scopes actually granted at consent time

connectedAt*string

ISO 8601 timestamp of the first connect (never touched by a reconnect)

Formatdate-time
expiresAt*string

ISO 8601 expiry of the current access token -- refreshed on use, so this advances on every successful resolve; a stale value with a set refreshFailedAt means the connection is dead until Reconnect

Formatdate-time
refreshFailedAt*string

ISO 8601 timestamp of the most recent failed refresh attempt, or null if the last refresh (or the connection's initial token exchange) succeeded

Formatdate-time
grantedBy*string

The member who most recently completed this connection's consent

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
updatedAt*string

ISO 8601 last-modified timestamp

Formatdate-time
Example Request
curl -X PATCH 'https://api.nuvelics.com/api/tenant/v1/social-connections/string' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "string"}'
Example Response
{  "id": "string",  "orgId": "string",  "platform": "string",  "credentialId": "string",  "displayName": "string",  "handle": "string",  "accountDisplayName": "string",  "scopes": "string",  "connectedAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "refreshFailedAt": "2019-08-24T14:15:22Z",  "grantedBy": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
DELETE
/api/tenant/v1/social-connections/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Social connection identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

Social connection deleted, together with its credential

Example Request
curl -X DELETE 'https://api.nuvelics.com/api/tenant/v1/social-connections/string'
Example Response
Empty
POST
/api/tenant/v1/social-connections/authorize

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
platform*string

OAuth provider registry id to connect (e.g. x)

Length1 <= length

Response Body

The platform's consent URL for the browser to follow

application/json
  1. response
authorizationUrl*string

The platform's consent URL for the browser to follow

Formaturi
Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/social-connections/authorize' \  -H 'Content-Type: application/json' \  -d '{  "platform": "string"}'
Example Response
{  "authorizationUrl": "http://example.com"}
POST
/api/tenant/v1/social-connections/{id}/reconnect

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Social connection identifier

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

The platform's consent URL for the browser to follow

application/json
  1. response
authorizationUrl*string

The platform's consent URL for the browser to follow

Formaturi
Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/social-connections/string/reconnect'
Example Response
{  "authorizationUrl": "http://example.com"}

Report a problem with this page

On this page