Projects

Grant a Postdot user access to a project

POST
/api/projects/{projectId}/user-grants

Authorization

sessionCookie
cookiebetter-auth.session_token<token>

The Better Auth email/password session cookie used by the web application.

Path Parameters

projectId*string
Length1 <= length

Request Body

  1. body
userId*string
Length1 <= length
role*string
Value in"editor""viewer"

Response Body

Response for status 201

application/json
  1. response
grant*
Example Request
curl -X POST 'https://postbot.example/api/projects/string/user-grants' \
  -H 'Content-Type: application/json' \
  -d '{
  "userId": "string",
  "role": "editor"
}'
Example Response
{
  "grant": {
    "id": "string",
    "projectId": "string",
    "userId": "string",
    "role": "owner",
    "createdAt": 0,
    "updatedAt": 0
  }
}

Was this page helpful?