SureshakeDocs

Sureshake API

REST API for Sureshake - Web3-native document verification platform

List entities

GET
/entities

Get a paginated list of entities with optional filtering and search

Authorization

Authorization
AuthorizationBearer <token>

In: header

Query Parameters

limit?string
offset?string
entityType?string
parentId?|
ownerId?string
search?string
sortBy?string
Default"createdAt"
Value in"name" | "createdAt" | "updatedAt"
sortOrder?string
Default"desc"
Value in"asc" | "desc"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3041/api/v1/entities"
{
  "entities": [
    null
  ],
  "pagination": {
    "limit": 0,
    "offset": 0,
    "total": 0,
    "hasMore": true
  }
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Create entity

POST
/entities

Create a new entity

Authorization

Authorization
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3041/api/v1/entities" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "collectionId": "0ffe69e2-b7af-4b1e-835c-867376165f50"  }'
null
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Get entity by ID

GET
/entities/{id}

Get a specific entity by its ID

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3041/api/v1/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08"
null
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Delete entity

DELETE
/entities/{id}

Delete an entity permanently

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "http://localhost:3041/api/v1/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "success": true
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Update entity

PUT
/entities/{id}

Update an existing entity

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:3041/api/v1/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "data": {}  }'
null
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

List API keys

GET
/api-keys

Get a paginated list of API keys

Authorization

Authorization
AuthorizationBearer <token>

In: header

Query Parameters

limit?string
offset?string
includeInactive?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3041/api/v1/api-keys"
{
  "apiKeys": [
    null
  ],
  "pagination": {
    "limit": 0,
    "offset": 0,
    "total": 0,
    "hasMore": true
  }
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Create API key

POST
/api-keys

Create a new API key for programmatic access

Authorization

Authorization
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3041/api/v1/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "scope": "read"  }'
null
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Get API key by ID

GET
/api-keys/{id}

Get a specific API key by its ID

Authorization

Authorization
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3041/api/v1/api-keys/string"
null
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Get API key statistics

GET
/api-keys/stats

Get usage statistics for all API keys

Authorization

Authorization
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:3041/api/v1/api-keys/stats"
null
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}