Skip to main content
POST
/
authorizations
cURL
curl "https://api.phrase.com/v2/authorizations" \
  -u USERNAME \
  -X POST \
  -d '{"note":"My Deploy Script","scopes":["read","write"],"expires_at":"2015-03-30T09:52:53Z"}' \
  -H 'Content-Type: application/json'
{
  "id": "abcd1234cdef1234abcd1234cdef1234",
  "note": "My Deploy Script",
  "token_last_eight": "1234abcd",
  "hashed_token": "abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234",
  "scopes": [
    "read"
  ],
  "expires_at": "2015-03-30T09:52:53Z",
  "created_at": "2015-01-28T09:52:53Z",
  "updated_at": "2015-01-28T09:52:53Z",
  "token": "abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234abcd1234cdef1234"
}

Authorizations

Authorization
string
header
required

Enter your token in the format token TOKEN

Headers

X-PhraseApp-OTP
string

Two-Factor-Authentication token (optional)

Body

application/json
note
string
required

A note to help you remember what the access is used for.

Example:

"My Deploy Script"

scopes
string[]

A list of scopes that the access can be used for.

Example:
["read", "write"]
expires_at
string<date-time>

Expiration date for the authorization token. Null means no expiration date (default).

Example:

"2015-03-30T09:52:53Z"

Response

Created

id
string
note
string
token_last_eight
string
hashed_token
string
scopes
string[]
expires_at
string<date-time>
created_at
string<date-time>
updated_at
string<date-time>
token
string