Skip to content

Count active shares

GET
/orgs/{orgId}/shares/count
curl --request GET \
--url https://example.com/api/v1/orgs/example/shares/count \
--header 'Authorization: Bearer <token>'

Returns the number of active (non-revoked) share links visible to the caller, optionally restricted to a single bucket.

orgId
required

Organization ID.

string
bucketId

Optional bucket ID to restrict the active share count.

string

Count of active share links visible to the caller

Media typeapplication/json
object
count
required
integer
<= 9007199254740991

Example generated

{
"count": 1
}

Authentication required or credentials invalid.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Insufficient role, bucket grant, or token scope.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Unexpected server error. Quote data.requestId when you report it.

Media typeapplication/json

Error returned when Sendcrate or one of its providers fails (5xx).

object
code
required
string
Allowed values: INTERNAL_SERVER_ERROR PROVIDER_FAILED
data
object
debug

Error chain with stack traces. Present only when the server runs in development mode.

Array
requestId

Request reference to quote when you report the error.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "INTERNAL_SERVER_ERROR"
}