Open App

Organizations

API endpoints for organizations

List organizations available to the token

GET /api/v1/organizations

Parameters

NameInTypeRequiredDescription
limitqueryintegerNoMaximum number of items to return.
offsetqueryintegerNoNumber of items to skip.
searchquerystringNoCase-insensitive search across scalar fields.
filterquerystringNoServer-side exact filters as comma-separated field=value pairs.
sortquerystringNoComma-separated sort fields. Prefix with - or suffix :desc for descending order.
cursorquerystringNoCursor returned by a previous cursor-mode list response.
pageModequerystring (offset, cursor)NoSet to cursor to return {items,nextCursor,hasMore} inside the response data.

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/organizations?limit=<limit>&offset=<offset>&search=<search>&filter=<filter>&sort=<sort>&cursor=<cursor>&pageMode=<pageMode>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}

Other statuses: 401, 403.

Response body type

{ data: Organization[] }


Get organization by WorkOS id

GET /api/v1/organizations/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYes

Example request

curl -X GET \
"https://api.getpilfer.com/api/v1/organizations/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "id": "string",
    "name": "string"
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: Organization }