Project
The project the calling project key belongs to.
| Operation | Method | SDK |
|---|---|---|
| Get the project | GET | hixel.project.get |
| Update the project | PATCH | hixel.project.update |
Get the project#
GET/v1/projecthixel.project.get
The key's project.
Takes a project key with the member role or higher.
Response 200: Project
| Field | Type | Description |
|---|---|---|
id required | string | The id of a project (proj_…). |
organization_id required | string | The id of your organization (org_…). |
name required | string | |
slug required | string | The project's name in URLs; unique in its organization. |
archived_at required | string | null | When the project was archived; null while it is not. |
created_at required | string (date-time) | |
updated_at required | string (date-time) |
Errors
- 400
invalid_request: The request is malformed or fails validation;paramnames the field. - 401
api_key_required,invalid_api_key,expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired. - 403
key_inactive: the project key was revoked or expired while the request ran.project_key_required: an environment's key was sent; the project's endpoints take a project key.
- 500
internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned. - 503
database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.
curl "https://api.hixel.dev/v1/project" \
-H "Authorization: Bearer $HIXEL_PROJECT_KEY"const project = await hixel.project.get();Update the project#
PATCH/v1/projecthixel.project.update
Renames the project or changes its slug.. Archiving a project is the organization's to do, in the dashboard.
Takes a project key with the admin role. Accepts an Idempotency-Key header: a retry with the same key runs once.
Request body: UpdateProjectBody
| Field | Type | Description |
|---|---|---|
name | string | 1 to 100 characters. |
slug | string | 2 to 48 lowercase letters, digits and dashes; unique in the organization. |
Response 200: Project
| Field | Type | Description |
|---|---|---|
id required | string | The id of a project (proj_…). |
organization_id required | string | The id of your organization (org_…). |
name required | string | |
slug required | string | The project's name in URLs; unique in its organization. |
archived_at required | string | null | When the project was archived; null while it is not. |
created_at required | string (date-time) | |
updated_at required | string (date-time) |
Errors
- 400
invalid_parameter: The request is malformed or fails validation;paramnames the field.invalid_idempotency_key: anIdempotency-Keyis 1 to 255 characters of visible ASCII.invalid_payload,malformed_body,body_too_large: the request's path, query or body does not match its schema, or the body is not JSON or is over 1 MiB.
- 401
api_key_required,invalid_api_key,expired_api_key: no key was sent; the key is unknown or revoked, or its project or environment is archived; or it has expired. - 403
key_inactive: the project key was revoked or expired while the request ran.project_key_required: an environment's key was sent; the project's endpoints take a project key.role_not_allowed: the project key'smemberrole does not allow this; it takesadmin.
- 409
slug_taken: Another project of this organization already uses this slug.project_archived: This project is archived.idempotency_key_reused,idempotency_key_in_use: the key was used for another request (method, path or body), or the first request with it is still running.
- 500
internal: an unexpected failure on the platform's side (internal_error); the details are logged, never returned. - 503
database_unavailable: A dependency, such as the database or Stripe, cannot be reached; retry later.database_unavailable: the stored response to the key could not be read or written; retry later.
curl -X PATCH "https://api.hixel.dev/v1/project" \
-H "Authorization: Bearer $HIXEL_PROJECT_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Inc."
}'const project = await hixel.project.update({
name: "Acme Inc.",
});