github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/authorizations/create.yaml (about) 1 --- 2 summary: Create an authorization 3 description: Create a new authorization. 4 operationId: authorization/create 5 tags: 6 - Authorizations 7 parameters: 8 - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" 9 responses: 10 '201': 11 description: Created 12 content: 13 application/json: 14 schema: 15 "$ref": "../../schemas/authorization_with_token.yaml#/authorization_with_token" 16 headers: 17 X-Rate-Limit-Limit: 18 "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" 19 X-Rate-Limit-Remaining: 20 "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" 21 X-Rate-Limit-Reset: 22 "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" 23 '400': 24 "$ref": "../../responses.yaml#/400" 25 '404': 26 "$ref": "../../responses.yaml#/404" 27 '429': 28 "$ref": "../../responses.yaml#/429" 29 x-code-samples: 30 - lang: Curl 31 source: |- 32 curl "https://api.phrase.com/v2/authorizations" \ 33 -u USERNAME \ 34 -X POST \ 35 -d '{"note":"My Deploy Script","scopes":["read","write"],"expires_at":"2015-03-30T09:52:53Z"}' \ 36 -H 'Content-Type: application/json' 37 - lang: CLI v2 38 source: |- 39 phrase authorizations create \ 40 --data '{"note": "My Deploy Script", "scopes": "read,write", "expires_at": "2015-03-30T09:52:53Z"}' 41 requestBody: 42 required: true 43 content: 44 application/json: 45 schema: 46 type: object 47 title: authorization/create/parameters 48 required: 49 - note 50 properties: 51 note: 52 description: A note to help you remember what the access is used for. 53 type: string 54 example: My Deploy Script 55 scopes: 56 description: A list of scopes that the access can be used for. 57 type: array 58 items: 59 type: string 60 example: 61 - read 62 - write 63 expires_at: 64 description: Expiration date for the authorization token. Null means no expiration date (default). 65 type: string 66 format: date-time 67 example: '2015-03-30T09:52:53Z' 68 x-cli-version: '2.5'