Skip to content

The acting credential

GET
/v1/me
curl --request GET \
--url https://api.pealboard.com/v1/me \
--header 'Authorization: Bearer <token>'

Who this request is acting as, in which workspace, with what role, and — for an API key — which scopes it was narrowed to. This is the one route no narrowing can take away.

Access. Requires the viewer role or above (viewer, member, admin, owner). A credential must be able to read its own label, or every route documented as defaulting to the caller is unreachable by exactly the narrowed integration keys that default exists for. Readable by every credential, whatever scopes it is narrowed to.

The credential’s own label.

Media typeapplication/json
object
userId
required

A UUID this API issued.

string format: uuid
name
required
string
email
required
string format: email
github
required
object
login
required
string
userId
required
number
writesAsSelf
required
boolean
workspace
required

The workspace this credential is acting in, or null when the request named none.

object
id
required

A UUID this API issued.

string format: uuid
name
required
string
slug
required

Lowercase letters, digits and hyphens.

string
>= 2 characters <= 40 characters /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/
role
required

Owner: billing and deleting the workspace. admin: members, portals, the GitHub connection. member: issues, comments, project fields. viewer: read only.

string
Allowed values: owner admin member viewer
membershipId
required

A UUID this API issued.

string format: uuid
credential
required

What this request was authenticated with.

object
via
required
string
Allowed values: session api_key
apiKeyId
required

A UUID this API issued.

string | null format: uuid
scopes
required

Empty means the key is not narrowed.

Array<string>
Allowed values: self:read workspace:read workspace:write members:read members:write github:read github:write issues:read issues:write projects:read projects:write portals:read portals:write requests:read requests:write views:read views:write keys:read keys:write
Example
{
"workspace": {
"slug": "acme",
"role": "owner"
},
"credential": {
"via": "session",
"scopes": [
"self:read"
]
}
}

No valid credentials.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

Authenticated, but not permitted.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

No such resource, or it is not visible to you.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The request conflicts with the current state.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The request did not match the expected shape.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

Rate limited. Retry after the interval in the header.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

GitHub or another dependency refused or did not answer. Nothing in the workspace changed.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}