Projects

GET /v2/projects

List all projects the current user has access to.

This endpoint is paginated.

Example Request

curl "https://api.phraseapp.com/api/v2/projects" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp projects list

Response

Status: 200
[ { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "account": "account", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" }, { "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "account": "account", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z" } ]

GET /v2/projects/:id

Get details on a single project.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:id" \
  -u USERNAME_OR_ACCESS_TOKEN
phraseapp project show <id>

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "account": "account", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z", "shares_translation_memory": true }

POST /v2/projects

Create a new project.

Parameters

Name Type Description
name string Name of the project
main_format
optional
string Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see Format Guide or our Formats API Endpoint.
shares_translation_memory
optional
boolean Indicates whether the project should share the account's translation memory
Default: false
account_id
optional
string Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.

Example Request

curl "https://api.phraseapp.com/api/v2/projects" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"name":"My Android Project","main_format":"yml","shares_translation_memory":true,"account_id":"abcd1234"}' \
  -H 'Content-Type: application/json'
phraseapp project create \
--name "My Android Project" \
--main-format yml \
--shares-translation-memory true \
--account-id abcd1234

Response

Status: 201
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "account": "account", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z", "shares_translation_memory": true }

PATCH /v2/projects/:id

Update an existing project.

Parameters

Name Type Description
name string Name of the project
main_format
optional
string Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see Format Guide or our Formats API Endpoint.
shares_translation_memory
optional
boolean Indicates whether the project should share the account's translation memory
Default: false
account_id
optional
string Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"name":"My Android Project","main_format":"yml","shares_translation_memory":true,"account_id":"abcd1234"}' \
  -H 'Content-Type: application/json'
phraseapp project update <id> \
--name "My Android Project" \
--main-format yml \
--shares-translation-memory true \
--account-id abcd1234

Response

Status: 200
{ "id": "abcd1234cdef1234abcd1234cdef1234", "name": "My Android Project", "main_format": "xml", "account": "account", "created_at": "2015-01-28T09:52:53Z", "updated_at": "2015-01-28T09:52:53Z", "shares_translation_memory": true }

DELETE /v2/projects/:id

Delete an existing project.

Example Request

curl "https://api.phraseapp.com/api/v2/projects/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X DELETE
phraseapp project delete <id>

Response

Status: 204