POST /api/v4/workspaces/twitter_accounts
Create Twitter Account for Workspace

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "twitter_account": {
    "twitter_token": "TWITTER_TOKEN",
    "twitter_uid": "TWITTER_UID",
    "screen_name": "NAME",
    "logo_url": "LOGO_URL",
    "account_verified": true,
    "twitter_nickname": "SCREEN_NAME",
    "location": signUpForm
  }
}

Success response body

{
  "success": true,
  "twitter_account": {
    "id": 2,
    "screen_name": "ekaterinaaaa3",
    "logo_url": "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png",
    "nickname": "NICKNAME",
    "teams_count": 0,
    "account_verified": true,
    "twitter_nickname": "GipperWorker"
  }
}

Error response body

# in your account
{
  "success": false,
  "message": ["To connect this social media account to your Workspace, you must first remove it from your Personal accounts"]
}
# for members
{
  "success": false,
  "message": ["This social account is already connected to example_1@mail.com, example_2@mail.com Gipper account(s). If you'd like to use this as a workspace account, please ask them to remove in their Profile first"]
}

Errors

Code Description
422 Could not save the entity.

Params

Param name Description
twitter_account
required

Validations:

  • Must be a Hash

twitter_account[twitter_token]
required

Validations:

  • Must be a String

twitter_account[twitter_uid]
required

Validations:

  • Must be a String

twitter_account[screen_name]
required

Validations:

  • Must be a String

twitter_account[logo_url]
required

Validations:

  • Must be a String

twitter_account[account_verified]
optional

Validations:

  • Must be one of: true, false, 1, 0.

twitter_account[twitter_nickname]
required

Validations:

  • Must be a String

twitter_account[location]
optional

Validations:

  • Must be one of: workspaceSettingsPage, signUpForm, guidedWalkthrough, progressMeter, personalSettingsPage, templateBranding.


PUT /api/v4/workspaces/twitter_accounts/:id
Update Twitter Account

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "twitter_account": {
    "nickname": "NICKNAME",
    "team_ids": [1, 2, ...]
  }
}

Success response body

{
  "id": 1,
  "screen_name": "SCREEN NAME",
  "logo_url": "LOGO URL",
  "nickname": "NICKNAME",
  "teams_count": 2
}

Params

Param name Description
id
required

ID of Twitter Account

Validations:

  • Must be a Integer

twitter_account
required

Validations:

  • Must be a Hash

twitter_account[nickname]
optional

Validations:

  • Must be a String

twitter_account[team_ids]
required , nil allowed

Validations:

  • Must be an array of Integer


GET /api/v4/workspaces/twitter_accounts/search_users
Search many users

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "accounts": [
    {
      "icon_url": "https://pbs.twimg.com/profile_images/1590968738358079488/IY9Gx6Ok_normal.jpg",
      "screen_name": "elonmusk",
      "name": "Elon Musk"
    },
    {
      "icon_url": "https://pbs.twimg.com/profile_images/1561717677600686083/Dm80jwOp_normal.jpg",
      "screen_name": "MattWallace888",
      "name": "Matt Wallace"
    },
    {
      "icon_url": "https://pbs.twimg.com/profile_images/1595223996249026560/CwdKYgll_normal.jpg",
      "screen_name": "NFPICT",
      "name": "Stop Bigots and Fascists like @elonmusk"
    }...
  ],
  "error": false
}

Params

Param name Description
search_query
required

Twitter user name

Validations:

  • Must be a String


DELETE /api/v4/workspace/twitter_accounts/:id
Delete Workspace Twitter Account

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true
}

Params

Param name Description
id
required

ID of Twitter Account

Validations:

  • Must be a Integer