Workspaces

POST /public/v1/workspace-grants

Grant a user's API key visibility into a workspace without a workspace membership. The granted user gains MEMBER-level access on grant-aware Public API endpoints (workspace listing and endpoints resolving scope through the shared workspace-scope helpers); remaining endpoints are being rolled onto the grant-aware path. Requires an OWNER or ADMIN membership on the target workspace (or a workspace key for it) — a key can never grant itself access.

POST /public/v1/workspace-grants

POST /public/v1/workspace-grants

curl --request POST \
  --url 'https://api.joinvalley.co/public/v1/workspace-grants' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "value"
}'
{
  "statusCode": 1,
  "status": true,
  "message": "<string>",
  "data": {
    "grant": {
      "user_id": "<string>",
      "user_email": "<string>",
      "workspace_id": "<string>",
      "granted_by_user_id": "<string>",
      "created_at": "<string>"
    }
  }
}

Default Response

Authorizations

  • x-api-key string required header

    Your Valley API key.

Request Body

application/json
  • workspace_id string required
  • user_email string (email) required

Response

application/json
  • statusCode number
  • status boolean
  • message string
  • data object
    + Show Child Attributes
    • grant object
      + Show Child Attributes
      • user_id string
      • user_email string
      • workspace_id string
      • granted_by_user_id string
      • created_at string