API & Developers
Get the project assigned to a token
Endpoint
GET /api/v1/projectThe token must have the project:read ability, be assigned to a project, and belong to a user who can still view that project.
cURL example
curl "https://deploymonitor.com/api/v1/project" \
--header "Authorization: Bearer ${DEPLOYMONITOR_TOKEN}" \
--header "Accept: application/json"JavaScript example
const response = await fetch('https://deploymonitor.com/api/v1/project', {
headers: {
Authorization: `Bearer ${process.env.DEPLOYMONITOR_TOKEN}`,
Accept: 'application/json',
},
});
if (!response.ok) {
throw new Error(await response.text());
}
const { data: project } = await response.json();
console.log(project.id);Successful response
A successful request returns 200 OK:
{
"data": {
"id": 45,
"name": "Production Site",
"url": "https://example.com",
"description": "Main production website.",
"avatar_url": null,
"created_at": "2026-08-19T17:00:00.000000Z",
"updated_at": "2026-08-19T17:00:00.000000Z"
}
}Use data.id as {project} in the project-log endpoints. The avatar_url and description values can be null.
Access failures
A valid token receives 403 Forbidden if it is not assigned to a project, lacks project:read, or its owner no longer has project access. A missing or invalid token receives 401 Unauthorized.
See Create and use API tokens for token management.