2021-12-03 15:29:50 +00:00
|
|
|
openapi: 3.0.1
|
|
|
|
info:
|
|
|
|
title: Mitra API
|
|
|
|
description: Mitra API spec
|
|
|
|
version: 1.0.0
|
|
|
|
|
|
|
|
paths:
|
2021-12-17 13:26:29 +00:00
|
|
|
/oauth/token:
|
|
|
|
post:
|
|
|
|
summary: Returns an access token, to be used during API calls that are not public.
|
2022-04-22 10:10:54 +00:00
|
|
|
description: EIP-4361 auth doesn't require blockchain integration.
|
2021-12-17 13:26:29 +00:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
grant_type:
|
|
|
|
type: string
|
|
|
|
enum:
|
2023-02-11 17:54:38 +00:00
|
|
|
- authorization_code
|
2021-12-17 13:26:29 +00:00
|
|
|
- password
|
2022-02-09 00:09:08 +00:00
|
|
|
- eip4361
|
2022-02-15 19:26:06 +00:00
|
|
|
example: eip4361
|
2023-02-11 17:54:38 +00:00
|
|
|
code:
|
|
|
|
description: A user authorization code, obtained via GET /oauth/authorize (required if grant type is "authorization_code").
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: null
|
2021-12-17 13:26:29 +00:00
|
|
|
username:
|
2021-12-24 17:46:01 +00:00
|
|
|
description: User name (required if grant type is "password").
|
2021-12-17 13:26:29 +00:00
|
|
|
type: string
|
2022-02-09 00:09:08 +00:00
|
|
|
message:
|
|
|
|
description: EIP-4361 message (required if grant type is "eip4361").
|
|
|
|
type: string
|
|
|
|
example: "example.com wants you to sign in with your Ethereum account:"
|
|
|
|
signature:
|
|
|
|
description: EIP-4361 signature (required if grant type is "eip4361").
|
|
|
|
type: string
|
|
|
|
example: 0x905...
|
2021-12-17 13:26:29 +00:00
|
|
|
password:
|
2022-04-30 16:25:41 +00:00
|
|
|
description: Password (required if grant type is "password").
|
2021-12-17 13:26:29 +00:00
|
|
|
type: string
|
2022-02-09 00:09:08 +00:00
|
|
|
example: null
|
2021-12-24 17:46:01 +00:00
|
|
|
required:
|
|
|
|
- grant_type
|
2021-12-17 13:26:29 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
access_token:
|
|
|
|
type: string
|
|
|
|
token_type:
|
|
|
|
type: string
|
|
|
|
example: Bearer
|
|
|
|
scope:
|
|
|
|
type: string
|
|
|
|
example: read write follow
|
|
|
|
created_at:
|
|
|
|
type: integer
|
|
|
|
example: 1639747526
|
|
|
|
400:
|
|
|
|
description: Invalid token request
|
2022-11-15 15:45:30 +00:00
|
|
|
/oauth/revoke:
|
|
|
|
post:
|
|
|
|
summary: Revoke an access token to make it no longer valid for use.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
token:
|
|
|
|
description: The previously obtained token, to be invalidated.
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
403:
|
|
|
|
description: Token doesn't belong to user.
|
2021-12-17 13:26:29 +00:00
|
|
|
/api/v1/accounts:
|
|
|
|
post:
|
|
|
|
summary: Creates a user and profile records.
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
username:
|
|
|
|
description: The desired username for the account.
|
|
|
|
type: string
|
|
|
|
password:
|
2022-02-15 19:26:06 +00:00
|
|
|
description: The password to be used for login. Either password or EIP-4361 message must be provided.
|
2021-12-17 13:26:29 +00:00
|
|
|
type: string
|
2022-02-15 19:26:06 +00:00
|
|
|
example: null
|
2022-02-14 18:07:16 +00:00
|
|
|
message:
|
|
|
|
description: EIP-4361 message
|
|
|
|
type: string
|
2022-02-15 19:26:06 +00:00
|
|
|
example: "example.com wants you to sign in with your Ethereum account:"
|
2022-02-14 18:07:16 +00:00
|
|
|
signature:
|
|
|
|
description: EIP-4361 signature (required if message is present)
|
2021-12-17 13:26:29 +00:00
|
|
|
type: string
|
2022-02-15 19:26:06 +00:00
|
|
|
example: 0x905...
|
2021-12-17 13:26:29 +00:00
|
|
|
invite_code:
|
|
|
|
description: Invite code
|
|
|
|
type: string
|
|
|
|
example: 9b288bfa7dc75fff53e98aa4d76e77d5
|
|
|
|
required:
|
|
|
|
- username
|
|
|
|
responses:
|
|
|
|
201:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-01-19 13:13:49 +00:00
|
|
|
$ref: '#/components/schemas/CredentialAccount'
|
2021-12-17 13:26:29 +00:00
|
|
|
400:
|
|
|
|
description: Invalid user data
|
2022-11-15 21:20:45 +00:00
|
|
|
/api/v1/accounts/verify_credentials:
|
|
|
|
get:
|
|
|
|
summary: Test to make sure that the user token works.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-01-19 13:13:49 +00:00
|
|
|
$ref: '#/components/schemas/CredentialAccount'
|
2022-11-15 21:20:45 +00:00
|
|
|
/api/v1/accounts/update_credentials:
|
|
|
|
patch:
|
|
|
|
summary: Update the user's display and preferences.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
display_name:
|
|
|
|
description: The display name to use for the profile.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
note:
|
2022-12-21 13:26:30 +00:00
|
|
|
description: The account bio (markdown).
|
2022-11-15 21:20:45 +00:00
|
|
|
type: string
|
|
|
|
nullable: true
|
2022-12-21 13:26:30 +00:00
|
|
|
avatar:
|
|
|
|
description: Avatar image encoded as base64.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
2023-01-05 17:36:38 +00:00
|
|
|
avatar_media_type:
|
|
|
|
description: The media type of avatar image.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
2022-12-21 13:26:30 +00:00
|
|
|
header:
|
|
|
|
description: Header image encoded as base64.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
2023-01-05 17:36:38 +00:00
|
|
|
header_media_type:
|
|
|
|
description: The media type of header image.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
2022-12-21 13:26:30 +00:00
|
|
|
fields_attributes:
|
|
|
|
description: The profile fields to be set.
|
|
|
|
type: array
|
|
|
|
nullable: true
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: Name of the field.
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
description: Value of the field (markdown).
|
|
|
|
type: string
|
2022-11-15 21:20:45 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-01-19 13:13:49 +00:00
|
|
|
$ref: '#/components/schemas/CredentialAccount'
|
2022-11-15 21:20:45 +00:00
|
|
|
400:
|
|
|
|
description: Invalid user data.
|
2022-10-29 20:19:39 +00:00
|
|
|
/api/v1/accounts/signed_update:
|
|
|
|
get:
|
|
|
|
summary: Build Update(Person) activity for signing (experimental).
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-07 16:44:00 +00:00
|
|
|
params:
|
|
|
|
description: Activity parameters
|
|
|
|
$ref: '#/components/schemas/ActivityParameters'
|
|
|
|
message:
|
2022-10-29 20:19:39 +00:00
|
|
|
description: Canonical representation of activity.
|
|
|
|
type: string
|
|
|
|
example: '{"type":"Update"}'
|
2022-11-26 21:13:37 +00:00
|
|
|
/api/v1/accounts/send_activity:
|
2022-10-29 20:19:39 +00:00
|
|
|
post:
|
|
|
|
summary: Send signed activity (experimental).
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-07 16:44:00 +00:00
|
|
|
params:
|
|
|
|
description: Activity parameters
|
|
|
|
$ref: '#/components/schemas/ActivityParameters'
|
2022-10-29 20:19:39 +00:00
|
|
|
signer:
|
|
|
|
description: Signer's identifier (DID)
|
|
|
|
type: string
|
|
|
|
example: 'did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a'
|
|
|
|
signature:
|
|
|
|
description: Signature value.
|
|
|
|
type: string
|
|
|
|
example: '3312dacd...'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
400:
|
|
|
|
description: Invalid signature data.
|
2022-04-22 10:10:54 +00:00
|
|
|
/api/v1/accounts/identity_proof:
|
|
|
|
get:
|
|
|
|
summary: Get unsigned data for identity proof.
|
2022-08-15 20:11:58 +00:00
|
|
|
parameters:
|
2022-11-10 10:48:25 +00:00
|
|
|
- name: proof_type
|
2022-08-15 20:11:58 +00:00
|
|
|
in: query
|
2022-11-10 10:48:25 +00:00
|
|
|
description: Type of identity proof.
|
2022-08-15 20:11:58 +00:00
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
2022-11-10 10:48:25 +00:00
|
|
|
enum:
|
|
|
|
- ethereum
|
2022-11-10 10:13:03 +00:00
|
|
|
- minisign
|
2022-11-10 10:48:25 +00:00
|
|
|
- name: signer
|
|
|
|
in: query
|
|
|
|
description: Information about the signer.
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
example: '0xb9c5714089478a327f09197987f16f9e5d936e8a'
|
2022-04-22 10:10:54 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-10 10:48:25 +00:00
|
|
|
did:
|
|
|
|
description: Signer ID (DID).
|
|
|
|
type: string
|
|
|
|
example: did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a
|
2022-04-22 10:10:54 +00:00
|
|
|
claim:
|
|
|
|
description: Identity claim serialized as compact JSON.
|
|
|
|
type: string
|
|
|
|
example: '{"id":"https://example.com/users/1","ownerOf":"did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a"}'
|
2022-08-15 20:11:58 +00:00
|
|
|
400:
|
|
|
|
description: Invalid request parameters
|
2022-04-22 10:10:54 +00:00
|
|
|
post:
|
|
|
|
summary: Submit identity proof.
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-08-15 20:11:58 +00:00
|
|
|
did:
|
2022-10-29 20:19:39 +00:00
|
|
|
description: Signer (DID).
|
2022-08-15 20:11:58 +00:00
|
|
|
type: string
|
|
|
|
example: 'did:pkh:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a'
|
2022-04-22 10:10:54 +00:00
|
|
|
signature:
|
|
|
|
description: Signature value.
|
|
|
|
type: string
|
|
|
|
example: '3312dacd...'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
400:
|
2022-08-15 20:11:58 +00:00
|
|
|
description: Invalid proof data.
|
2022-02-02 21:31:40 +00:00
|
|
|
/api/v1/accounts/relationships:
|
|
|
|
get:
|
|
|
|
summary: Find out whether a given actor is followed, blocked, muted, etc.
|
|
|
|
parameters:
|
|
|
|
- name: 'id[]'
|
|
|
|
in: query
|
|
|
|
description: Actor IDs to check
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Relationship list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Relationship'
|
2022-12-28 00:13:49 +00:00
|
|
|
/api/v1/accounts/lookup:
|
|
|
|
get:
|
|
|
|
summary: Lookup webfinger address.
|
|
|
|
parameters:
|
|
|
|
- name: acct
|
|
|
|
in: query
|
|
|
|
description: The username or Webfinger address to lookup.
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
404:
|
|
|
|
description: Profile not found
|
2022-09-05 23:42:23 +00:00
|
|
|
/api/v1/accounts/search:
|
|
|
|
get:
|
|
|
|
summary: Search for matching profiles by username.
|
|
|
|
parameters:
|
|
|
|
- name: q
|
|
|
|
in: query
|
|
|
|
description: What to search for
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results. Defaults to 40.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: number
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Profile list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Account'
|
2022-08-04 11:14:54 +00:00
|
|
|
/api/v1/accounts/search_did:
|
|
|
|
get:
|
|
|
|
summary: Search profile by DID
|
|
|
|
parameters:
|
|
|
|
- name: did
|
|
|
|
in: query
|
|
|
|
description: Decentralized identifier (DID)
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Profile list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
400:
|
|
|
|
description: Invalid DID
|
2022-02-05 19:49:14 +00:00
|
|
|
/api/v1/accounts/{account_id}:
|
|
|
|
get:
|
|
|
|
summary: View information about a profile.
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
404:
|
|
|
|
description: Profile not found
|
2021-12-14 16:16:30 +00:00
|
|
|
/api/v1/accounts/{account_id}/statuses:
|
|
|
|
get:
|
2022-01-11 16:58:40 +00:00
|
|
|
summary: Posts created by the given actor.
|
2021-12-14 16:16:30 +00:00
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
2022-07-07 14:56:01 +00:00
|
|
|
- name: exclude_replies
|
|
|
|
in: query
|
|
|
|
description: Exclude replies from results.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: boolean
|
|
|
|
default: true
|
2021-12-14 16:16:30 +00:00
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results older than this ID.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 20
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Post list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
2022-01-11 16:58:40 +00:00
|
|
|
404:
|
|
|
|
description: Profile not found
|
2021-12-29 12:07:56 +00:00
|
|
|
/api/v1/accounts/{account_id}/followers:
|
|
|
|
get:
|
|
|
|
summary: Actors which follow the given actor.
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results with relationship ID older than this value.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 40
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Profile list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Account'
|
2022-08-06 22:13:47 +00:00
|
|
|
headers:
|
|
|
|
Link:
|
|
|
|
description: Link to the next page
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
example: '<https://example.org/api/v1/accounts/1/followers?limit=40&max_id=7628164>; rel="next"'
|
2021-12-29 12:07:56 +00:00
|
|
|
404:
|
|
|
|
description: Profile not found
|
|
|
|
/api/v1/accounts/{account_id}/following:
|
|
|
|
get:
|
|
|
|
summary: Actors which the given actor is following.
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results with relationship ID older than this value.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 40
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Profile list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Account'
|
2022-08-06 22:13:47 +00:00
|
|
|
headers:
|
|
|
|
Link:
|
|
|
|
description: Link to the next page
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
example: '<https://example.org/api/v1/accounts/1/following?limit=40&max_id=7628164>; rel="next"'
|
2021-12-29 12:07:56 +00:00
|
|
|
404:
|
|
|
|
description: Profile not found
|
2022-07-31 10:54:09 +00:00
|
|
|
/api/v1/accounts/{account_id}/subscribers:
|
|
|
|
get:
|
|
|
|
summary: Subscriptions to the given actor.
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results with subscription ID older than this value.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 40
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Subscription list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Subscription'
|
|
|
|
404:
|
|
|
|
description: Profile not found
|
2022-01-03 18:13:16 +00:00
|
|
|
/api/v1/accounts/{account_id}/follow:
|
|
|
|
post:
|
|
|
|
summary: Follow the given actor.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
2022-02-21 15:20:18 +00:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
reblogs:
|
|
|
|
description: Receive this actor's reposts in home timeline?
|
|
|
|
type: boolean
|
|
|
|
default: true
|
2022-03-09 20:37:14 +00:00
|
|
|
replies:
|
|
|
|
description: Receive this actor's replies in home timeline?
|
|
|
|
type: boolean
|
|
|
|
default: true
|
2022-01-03 18:13:16 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successfully followed, or actor was already followed
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Relationship'
|
|
|
|
404:
|
|
|
|
description: Profile not found
|
|
|
|
/api/v1/accounts/{account_id}/unfollow:
|
|
|
|
post:
|
|
|
|
summary: Unfollow the given actor.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/account_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successfully unfollowed, or actor was already not followed
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Relationship'
|
|
|
|
404:
|
|
|
|
description: Profile not found
|
2023-02-10 23:29:42 +00:00
|
|
|
/api/v1/apps:
|
|
|
|
post:
|
|
|
|
summary: Create a new application to obtain OAuth2 credentials.
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
client_name:
|
|
|
|
description: A name for your application.
|
|
|
|
type: string
|
|
|
|
redirect_uris:
|
|
|
|
description: Where the user should be redirected after authorization.
|
|
|
|
type: string
|
|
|
|
scopes:
|
|
|
|
description: Space separated list of scopes.
|
|
|
|
type: string
|
|
|
|
example: 'read write'
|
|
|
|
website:
|
|
|
|
description: An URL to the homepage of your app.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
allOf:
|
|
|
|
- $ref: '#/components/schemas/Application'
|
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
client_id:
|
|
|
|
description: Client ID key, to be used for obtaining OAuth tokens.
|
|
|
|
type: string
|
|
|
|
client_secret:
|
|
|
|
description: Client secret key, to be used for obtaining OAuth tokens.
|
|
|
|
type: string
|
|
|
|
400:
|
|
|
|
description: Invalid request data.
|
2023-02-02 12:38:02 +00:00
|
|
|
/api/v1/custom_emojis:
|
|
|
|
get:
|
|
|
|
summary: Returns custom emojis that are available on the server.
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Emoji list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/CustomEmoji'
|
2022-01-11 16:58:40 +00:00
|
|
|
/api/v1/directory:
|
|
|
|
get:
|
2022-10-02 20:43:51 +00:00
|
|
|
summary: List profiles visible in the directory.
|
2022-01-11 16:58:40 +00:00
|
|
|
parameters:
|
|
|
|
- name: offset
|
|
|
|
in: query
|
2022-10-02 20:43:51 +00:00
|
|
|
description: How many profiles to skip before returning results.
|
2022-01-11 16:58:40 +00:00
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 0
|
|
|
|
- name: limit
|
|
|
|
in: query
|
2022-10-02 20:43:51 +00:00
|
|
|
description: How many profiles to load.
|
2022-01-11 16:58:40 +00:00
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 40
|
2022-10-02 20:43:51 +00:00
|
|
|
- name: local
|
|
|
|
in: query
|
|
|
|
description: Only return local profiles.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: boolean
|
|
|
|
default: true
|
2022-01-11 16:58:40 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Profile list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Account'
|
2022-01-26 00:17:10 +00:00
|
|
|
/api/v1/instance:
|
|
|
|
get:
|
|
|
|
summary: Information about the instance.
|
|
|
|
security: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Instance'
|
2022-12-21 16:05:26 +00:00
|
|
|
/api/v1/media:
|
|
|
|
post:
|
|
|
|
summary: Create an attachment to be used with a new post.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
file:
|
|
|
|
description: File encoded as base64.
|
|
|
|
type: string
|
|
|
|
media_type:
|
|
|
|
description: Media type.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: image/jpeg
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Attachment'
|
2022-01-14 20:43:04 +00:00
|
|
|
/api/v1/notifications:
|
|
|
|
get:
|
|
|
|
summary: Notifications concerning the user.
|
|
|
|
parameters:
|
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results older than this ID.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 20
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Notification list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Notification'
|
2022-11-25 23:37:04 +00:00
|
|
|
/api/v1/settings/change_password:
|
|
|
|
post:
|
|
|
|
summary: Set or change user's password.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
new_password:
|
|
|
|
description: New password.
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-01-19 13:13:49 +00:00
|
|
|
$ref: '#/components/schemas/CredentialAccount'
|
2022-11-25 23:37:04 +00:00
|
|
|
400:
|
|
|
|
description: Invalid request data.
|
2022-11-24 01:30:23 +00:00
|
|
|
/api/v1/settings/export_followers:
|
|
|
|
get:
|
|
|
|
summary: Export followers to CSV file
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
text/csv:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
example: |
|
|
|
|
user1@example.org
|
|
|
|
user2@example.org
|
|
|
|
/api/v1/settings/export_follows:
|
|
|
|
get:
|
|
|
|
summary: Export follows to CSV file
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
text/csv:
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
example: |
|
|
|
|
user1@example.org
|
|
|
|
user2@example.org
|
2023-01-10 20:46:57 +00:00
|
|
|
/api/v1/settings/import_follows:
|
|
|
|
post:
|
|
|
|
summary: Import follows from CSV file.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
follows_csv:
|
|
|
|
description: The list of followers in CSV format.
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
204:
|
|
|
|
description: Successful operation
|
|
|
|
400:
|
|
|
|
description: Invalid data.
|
2023-01-08 21:40:41 +00:00
|
|
|
/api/v1/settings/move_followers:
|
|
|
|
post:
|
2023-01-08 23:21:31 +00:00
|
|
|
summary: Move followers from remote alias.
|
2023-01-08 21:40:41 +00:00
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
from_actor_id:
|
|
|
|
description: The actor ID to move from.
|
|
|
|
type: string
|
|
|
|
example: 'https://xyz.com/users/test'
|
|
|
|
followers_csv:
|
|
|
|
description: The list of followers in CSV format.
|
|
|
|
type: string
|
|
|
|
example: |
|
|
|
|
user1@example.org
|
|
|
|
user2@test.com
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-01-19 13:13:49 +00:00
|
|
|
$ref: '#/components/schemas/CredentialAccount'
|
2023-01-08 21:40:41 +00:00
|
|
|
400:
|
|
|
|
description: Invalid data.
|
2022-01-07 20:41:46 +00:00
|
|
|
/api/v1/statuses:
|
|
|
|
post:
|
|
|
|
summary: Create new post.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
status:
|
2022-12-19 22:06:18 +00:00
|
|
|
description: Text content of the post.
|
2022-01-07 20:41:46 +00:00
|
|
|
type: string
|
2022-10-13 19:17:50 +00:00
|
|
|
content_type:
|
|
|
|
description: Media type of the post content.
|
|
|
|
type: string
|
|
|
|
default: text/html
|
2022-10-06 14:43:28 +00:00
|
|
|
enum:
|
|
|
|
- text/html
|
|
|
|
- text/markdown
|
2022-01-07 20:41:46 +00:00
|
|
|
'media_ids[]':
|
|
|
|
description: Array of Attachment ids to be attached as media.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
in_reply_to_id:
|
|
|
|
description: ID of the post being replied to, if post is a reply.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
visibility:
|
|
|
|
description: Visibility of the post.
|
2022-01-15 23:21:13 +00:00
|
|
|
$ref: '#/components/schemas/Visibility'
|
2022-01-15 16:36:25 +00:00
|
|
|
mentions:
|
|
|
|
description: Array of profile IDs to be mentioned
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
2022-01-07 20:41:46 +00:00
|
|
|
required:
|
|
|
|
- status
|
|
|
|
responses:
|
2023-02-19 16:50:02 +00:00
|
|
|
200:
|
2022-01-07 20:41:46 +00:00
|
|
|
description: Post created
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
400:
|
|
|
|
description: Invalid post data
|
2022-12-19 22:06:18 +00:00
|
|
|
/api/v1/statuses/preview:
|
|
|
|
post:
|
|
|
|
summary: Preview new post.
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
status:
|
|
|
|
description: Text content of the post.
|
|
|
|
type: string
|
|
|
|
content_type:
|
|
|
|
description: Media type of the post content.
|
|
|
|
type: string
|
|
|
|
default: text/html
|
|
|
|
enum:
|
|
|
|
- text/html
|
|
|
|
- text/markdown
|
|
|
|
required:
|
|
|
|
- status
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Preview generated.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
content:
|
|
|
|
description: HTML-encoded post content.
|
|
|
|
type: string
|
|
|
|
400:
|
|
|
|
description: Invalid post data.
|
2021-12-04 00:42:36 +00:00
|
|
|
/api/v1/statuses/{status_id}:
|
|
|
|
delete:
|
|
|
|
summary: Delete post
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
204:
|
|
|
|
description: Successful operation
|
|
|
|
content: {}
|
|
|
|
403:
|
|
|
|
description: Post does not belong to user
|
|
|
|
404:
|
|
|
|
description: Post not found
|
2023-02-12 23:15:28 +00:00
|
|
|
/api/v1/statuses/{status_id}/context:
|
|
|
|
get:
|
|
|
|
summary: View statuses above and below this status in the thread.
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
ancestors:
|
|
|
|
description: Parents in the thread.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
descendants:
|
|
|
|
description: Parents in the thread.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
404:
|
|
|
|
description: Post not found
|
2023-02-12 23:24:28 +00:00
|
|
|
/api/v1/statuses/{status_id}/thread:
|
|
|
|
get:
|
|
|
|
summary: Get thread that contains given post.
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
404:
|
|
|
|
description: Post not found
|
2022-01-15 15:25:37 +00:00
|
|
|
/api/v1/statuses/{status_id}/favourite:
|
|
|
|
post:
|
|
|
|
summary: Add post to your favourites list
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
404:
|
|
|
|
description: Post does not exist or is not public
|
|
|
|
/api/v1/statuses/{status_id}/reblog:
|
|
|
|
post:
|
|
|
|
summary: Repost a post
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
2022-04-07 20:17:27 +00:00
|
|
|
description: Successful operation. Returns repost info.
|
2022-01-15 15:25:37 +00:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
404:
|
|
|
|
description: Post does not exist or is not public
|
2022-04-07 20:17:27 +00:00
|
|
|
/api/v1/statuses/{status_id}/unreblog:
|
|
|
|
post:
|
|
|
|
summary: Undo repost
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Post no longer resposted.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
404:
|
|
|
|
description: Post does not exist or no repost exists
|
2021-12-12 13:38:10 +00:00
|
|
|
/api/v1/statuses/{status_id}/make_permanent:
|
2021-12-03 15:29:50 +00:00
|
|
|
post:
|
|
|
|
summary: Save post to IPFS
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Status'
|
2021-12-03 18:13:20 +00:00
|
|
|
403:
|
|
|
|
description: Post does not belong to user or is not public
|
2021-12-03 15:29:50 +00:00
|
|
|
404:
|
|
|
|
description: Post not found
|
2021-12-03 18:13:20 +00:00
|
|
|
418:
|
|
|
|
description: IPFS integration is not enabled
|
|
|
|
422:
|
|
|
|
description: Post already saved to IPFS
|
2021-12-12 13:38:10 +00:00
|
|
|
/api/v1/statuses/{status_id}/signature:
|
2021-12-03 15:29:50 +00:00
|
|
|
get:
|
|
|
|
summary: Sign post data with instance key
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Signature created
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2022-01-26 14:59:15 +00:00
|
|
|
$ref: '#/components/schemas/Signature'
|
2021-12-03 18:13:20 +00:00
|
|
|
403:
|
2022-05-27 20:04:51 +00:00
|
|
|
description: Post does not belong to user, is not public or not saved to IPFS, or user's wallet address is not known or not verified
|
2021-12-03 15:29:50 +00:00
|
|
|
404:
|
|
|
|
description: Post not found
|
2021-12-03 18:13:20 +00:00
|
|
|
418:
|
2022-01-26 14:59:15 +00:00
|
|
|
description: Blockchain integration is not enabled
|
2021-12-12 13:38:10 +00:00
|
|
|
/api/v1/statuses/{status_id}/token_minted:
|
2021-12-03 18:44:01 +00:00
|
|
|
post:
|
|
|
|
summary: Register transaction that mints a token
|
|
|
|
parameters:
|
|
|
|
- $ref: '#/components/parameters/status_id'
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
properties:
|
|
|
|
transaction_id:
|
|
|
|
type: string
|
|
|
|
description: Transaction ID
|
2022-05-10 20:54:01 +00:00
|
|
|
example: '581186ab56765aed64a3e73172872a6454c604c6b4e08a8ed03eabad94e74d64'
|
2021-12-03 18:44:01 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Status'
|
|
|
|
403:
|
|
|
|
description: Post does not belong to user or is not public
|
|
|
|
404:
|
|
|
|
description: Post not found
|
|
|
|
422:
|
|
|
|
description: Transaction already registered
|
2022-08-25 15:21:59 +00:00
|
|
|
/api/v1/subscriptions/authorize:
|
|
|
|
get:
|
|
|
|
summary: Get authorization for setting up Ethereum subscription.
|
2022-08-25 23:01:08 +00:00
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
2022-08-25 15:21:59 +00:00
|
|
|
parameters:
|
|
|
|
- name: price
|
|
|
|
in: query
|
|
|
|
description: Subscription price
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: number
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Signature created
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Signature'
|
|
|
|
403:
|
|
|
|
description: User's wallet address is not known or not verified
|
|
|
|
418:
|
|
|
|
description: Blockchain integration is not enabled
|
2022-09-02 18:28:27 +00:00
|
|
|
/api/v1/subscriptions/options:
|
|
|
|
get:
|
|
|
|
summary: Get list of subscription options
|
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/SubscriptionOption'
|
2022-08-25 15:21:59 +00:00
|
|
|
post:
|
2022-09-15 20:18:14 +00:00
|
|
|
summary: Enable subscriptions or update subscription settings
|
2022-08-25 23:01:08 +00:00
|
|
|
security:
|
|
|
|
- tokenAuth: []
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2022-09-02 18:28:27 +00:00
|
|
|
$ref: '#/components/schemas/SubscriptionOption'
|
2022-08-25 15:21:59 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
400:
|
|
|
|
description: User hasn't enabled subscriptions
|
|
|
|
403:
|
|
|
|
description: User's wallet address is not known or not verified
|
|
|
|
418:
|
|
|
|
description: Blockchain integration is not enabled
|
2022-09-05 22:08:38 +00:00
|
|
|
/api/v1/subscriptions/find:
|
|
|
|
get:
|
|
|
|
summary: Find subscription by sender and recipient
|
|
|
|
parameters:
|
|
|
|
- name: sender_id
|
|
|
|
in: query
|
|
|
|
description: Sender ID.
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
- name: recipient_id
|
|
|
|
in: query
|
|
|
|
description: Recipient ID.
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: Subscription ID.
|
|
|
|
type: number
|
|
|
|
example: 1
|
|
|
|
expires_at:
|
|
|
|
description: The date when subscription expires.
|
|
|
|
type: string
|
2022-11-24 23:44:53 +00:00
|
|
|
format: date-time
|
2022-09-05 22:08:38 +00:00
|
|
|
404:
|
|
|
|
description: Subscription not found
|
2022-08-17 15:36:27 +00:00
|
|
|
/api/v1/subscriptions/invoices:
|
|
|
|
post:
|
|
|
|
summary: Create invoice
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-09-06 15:44:30 +00:00
|
|
|
sender_id:
|
|
|
|
description: Sender ID.
|
2022-08-17 15:36:27 +00:00
|
|
|
type: string
|
2022-09-06 15:44:30 +00:00
|
|
|
format: uuid
|
|
|
|
recipient_id:
|
2022-08-17 15:36:27 +00:00
|
|
|
description: Recipient ID.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
2022-09-18 00:23:20 +00:00
|
|
|
amount:
|
|
|
|
description: Requested payment amount (in atomic units).
|
|
|
|
type: integer
|
|
|
|
example: 100000000
|
2022-08-17 15:36:27 +00:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Invoice created.
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Invoice'
|
2022-09-07 11:57:17 +00:00
|
|
|
400:
|
|
|
|
description: Invalid request.
|
2022-08-17 15:36:27 +00:00
|
|
|
404:
|
|
|
|
description: Sender or recipient not found.
|
|
|
|
418:
|
|
|
|
description: Blockchain integration is not enabled.
|
2022-09-07 10:43:50 +00:00
|
|
|
/api/v1/subscriptions/invoices/{invoice_id}:
|
|
|
|
get:
|
|
|
|
summary: View information about an invoice.
|
|
|
|
parameters:
|
|
|
|
- name: invoice_id
|
|
|
|
in: path
|
|
|
|
description: Invoice ID
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Invoice'
|
|
|
|
404:
|
|
|
|
description: Invoice not found
|
2022-05-05 20:11:43 +00:00
|
|
|
/api/v1/timelines/public:
|
|
|
|
get:
|
|
|
|
summary: View local public posts.
|
|
|
|
parameters:
|
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results older than this ID.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 20
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Post list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
2021-12-12 13:38:10 +00:00
|
|
|
/api/v1/timelines/tag/{hashtag}:
|
|
|
|
get:
|
|
|
|
summary: View public posts containing the given hashtag
|
|
|
|
parameters:
|
|
|
|
- name: hashtag
|
|
|
|
in: path
|
|
|
|
description: Hashtag name
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
- name: max_id
|
|
|
|
in: query
|
|
|
|
description: Return results older than this ID.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
- name: limit
|
|
|
|
in: query
|
|
|
|
description: Maximum number of results to return.
|
|
|
|
required: false
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
default: 20
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Post list
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
2022-02-08 18:00:08 +00:00
|
|
|
/api/v2/search:
|
|
|
|
get:
|
|
|
|
summary: Search for profiles or posts
|
|
|
|
parameters:
|
|
|
|
- name: q
|
|
|
|
in: query
|
|
|
|
description: The search query
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: Successful operation
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
description: Search results
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
accounts:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
statuses:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Status'
|
2022-09-19 00:45:56 +00:00
|
|
|
hashtags:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Tag'
|
2021-12-03 15:29:50 +00:00
|
|
|
|
|
|
|
components:
|
2022-01-03 18:13:16 +00:00
|
|
|
securitySchemes:
|
|
|
|
tokenAuth:
|
|
|
|
type: http
|
|
|
|
scheme: bearer
|
2021-12-03 15:29:50 +00:00
|
|
|
parameters:
|
2021-12-14 16:16:30 +00:00
|
|
|
account_id:
|
|
|
|
name: account_id
|
|
|
|
in: path
|
|
|
|
description: Profile ID
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
2021-12-03 15:29:50 +00:00
|
|
|
status_id:
|
|
|
|
name: status_id
|
|
|
|
in: path
|
|
|
|
description: Post ID
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
schemas:
|
2021-12-16 23:00:52 +00:00
|
|
|
Account:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: The account id.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
username:
|
|
|
|
description: The username of the actor, not including domain.
|
|
|
|
type: string
|
|
|
|
example: user
|
|
|
|
acct:
|
|
|
|
description: The Webfinger account URI. Equal to username for local actors, or username@domain for remote actors.
|
|
|
|
type: string
|
|
|
|
example: user@example.com
|
2022-01-15 00:18:17 +00:00
|
|
|
url:
|
|
|
|
description: The location of the user's profile page.
|
|
|
|
type: string
|
|
|
|
example: https://example.com/@user
|
2022-12-14 09:24:12 +00:00
|
|
|
locked:
|
|
|
|
description: Whether the actor manually approves follow requests.
|
|
|
|
type: boolean
|
|
|
|
example: false
|
2022-04-26 14:12:26 +00:00
|
|
|
identity_proofs:
|
|
|
|
description: Identity proofs.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Field'
|
2022-09-06 17:47:08 +00:00
|
|
|
payment_options:
|
|
|
|
description: Payment options.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type:
|
|
|
|
description: Payment type.
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- link
|
|
|
|
- ethereum-subscription
|
|
|
|
- monero-subscription
|
|
|
|
name:
|
|
|
|
description: Link name (only for link type).
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
href:
|
|
|
|
description: Link URL (only for link type).
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
price:
|
|
|
|
description: Subscription price (only for ethereum-subscription and monero-subscription types).
|
|
|
|
type: number
|
|
|
|
nullable: true
|
|
|
|
example: null
|
2022-04-26 14:12:26 +00:00
|
|
|
fields:
|
|
|
|
description: Additional metadata attached to a profile as name-value pairs.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Field'
|
2022-09-13 12:41:15 +00:00
|
|
|
followers_count:
|
|
|
|
description: The reported followers of this profile.
|
|
|
|
type: number
|
|
|
|
following_count:
|
|
|
|
description: The reported follows of this profile.
|
|
|
|
type: number
|
|
|
|
subscribers_count:
|
|
|
|
description: The reported subscribers of this profile.
|
|
|
|
type: number
|
2023-01-19 13:13:49 +00:00
|
|
|
CredentialAccount:
|
2022-11-15 21:20:45 +00:00
|
|
|
allOf:
|
|
|
|
- $ref: '#/components/schemas/Account'
|
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
source:
|
|
|
|
description: Additional information about the user.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
note:
|
|
|
|
description: Profile bio.
|
|
|
|
type: string
|
2023-01-19 13:13:49 +00:00
|
|
|
role:
|
|
|
|
description: The role assigned to the currently authorized user.
|
|
|
|
$ref: '#/components/schemas/Role'
|
2022-11-07 16:44:00 +00:00
|
|
|
ActivityParameters:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type:
|
|
|
|
description: Activity type
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- update
|
2023-02-10 23:29:42 +00:00
|
|
|
Application:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: The name of your application.
|
|
|
|
type: string
|
|
|
|
website:
|
|
|
|
description: The website associated with your application.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
redirect_uri:
|
|
|
|
description: Where the user should be redirected after authorization.
|
|
|
|
type: string
|
2022-02-23 17:40:10 +00:00
|
|
|
Attachment:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: The ID of the attachment in the database.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
type:
|
|
|
|
description: The type of the attachment.
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- unknown
|
|
|
|
- image
|
|
|
|
- video
|
|
|
|
url:
|
|
|
|
description: The location of the original full-size attachment.
|
|
|
|
type: string
|
2023-01-16 22:40:03 +00:00
|
|
|
CustomEmoji:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
shortcode:
|
|
|
|
description: The name of the custom emoji.
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
description: A link to the custom emoji.
|
|
|
|
type: string
|
2023-02-02 12:38:02 +00:00
|
|
|
static_url:
|
|
|
|
description: A link to a static copy of the custom emoji.
|
|
|
|
type: string
|
2023-01-16 22:40:03 +00:00
|
|
|
visible_in_picker:
|
|
|
|
description: Whether this Emoji should be visible in the picker or unlisted.
|
|
|
|
type: boolean
|
2022-04-26 14:12:26 +00:00
|
|
|
Field:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: The key of a given field's key-value pair.
|
|
|
|
type: string
|
|
|
|
value:
|
|
|
|
description: The value associated with the name key.
|
|
|
|
type: string
|
|
|
|
verified_at:
|
|
|
|
description: Timestamp of when the server verified the field value.
|
|
|
|
type: string
|
2022-11-24 23:44:53 +00:00
|
|
|
format: date-time
|
2022-01-26 00:17:10 +00:00
|
|
|
Instance:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
uri:
|
|
|
|
description: The host name of the instance.
|
|
|
|
type: string
|
|
|
|
title:
|
|
|
|
description: The title of the website.
|
|
|
|
type: string
|
|
|
|
short_description:
|
|
|
|
description: A short description defined by the admin.
|
|
|
|
type: string
|
|
|
|
description:
|
2022-12-22 20:44:32 +00:00
|
|
|
description: Admin-defined description of the site (HTML).
|
|
|
|
type: string
|
|
|
|
description_source:
|
|
|
|
description: Admin-defined description of the site (Markdown source).
|
2022-01-26 00:17:10 +00:00
|
|
|
type: string
|
|
|
|
version:
|
2022-02-08 01:12:36 +00:00
|
|
|
description: Mastodon API compatibility version and the version of Mitra server.
|
2022-01-26 00:17:10 +00:00
|
|
|
type: string
|
2022-02-08 01:12:36 +00:00
|
|
|
example: '3.0.0 (compatible; Mitra 0.4.0)'
|
2022-01-26 00:17:10 +00:00
|
|
|
registrations:
|
|
|
|
description: Whether registrations are enabled.
|
|
|
|
type: boolean
|
2023-01-25 02:13:26 +00:00
|
|
|
approval_required:
|
|
|
|
description: Whether registrations require moderator approval.
|
|
|
|
type: boolean
|
|
|
|
invites_enabled:
|
|
|
|
description: Whether invites are enabled.
|
|
|
|
type: boolean
|
2022-10-04 20:50:00 +00:00
|
|
|
stats:
|
|
|
|
description: Statistics about how much information the instance contains.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
user_count:
|
|
|
|
description: Users registered on this instance
|
|
|
|
type: integer
|
|
|
|
status_count:
|
|
|
|
description: Statuses authored by users on instance.
|
|
|
|
type: integer
|
|
|
|
domain_count:
|
|
|
|
description: Domains federated with this instance.
|
|
|
|
type: integer
|
2023-01-06 16:46:59 +00:00
|
|
|
configuration:
|
|
|
|
description: Configured values and limits for this instance.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
statuses:
|
|
|
|
description: Limits related to authoring posts.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
max_characters:
|
|
|
|
description: The maximum number of allowed characters per post.
|
|
|
|
type: integer
|
|
|
|
example: 5000
|
|
|
|
max_media_attachments:
|
|
|
|
description: The maximum number of media attachments that can be added to a post.
|
|
|
|
type: integer
|
|
|
|
example: 15
|
|
|
|
media_attachments:
|
|
|
|
description: Limits realted to uploading attachments.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
supported_mime_types:
|
|
|
|
description: Contains MIME types that can be uploaded.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
example: 'image/png'
|
|
|
|
image_size_limit:
|
|
|
|
description: The maximum size of any uploaded image, in bytes.
|
|
|
|
type: integer
|
|
|
|
example: 5242880
|
2022-01-26 00:17:10 +00:00
|
|
|
login_message:
|
|
|
|
description: Login message for signer.
|
|
|
|
type: string
|
2022-02-08 21:04:28 +00:00
|
|
|
post_character_limit:
|
|
|
|
description: Post character limit.
|
|
|
|
type: integer
|
|
|
|
example: 5000
|
2022-08-31 19:38:35 +00:00
|
|
|
blockchains:
|
|
|
|
description: Information about blockchain integrations.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
chain_id:
|
|
|
|
description: CAIP-2 chain ID.
|
|
|
|
type: string
|
|
|
|
example: 'eip155:1'
|
|
|
|
chain_metadata:
|
|
|
|
description: Additional information about blockchain
|
|
|
|
type: object
|
|
|
|
nullable: true
|
|
|
|
contract_address:
|
|
|
|
description: Blockchain contract address.
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
features:
|
|
|
|
description: Blockchain features.
|
|
|
|
type: object
|
|
|
|
properties:
|
2022-11-16 15:11:25 +00:00
|
|
|
gate:
|
|
|
|
description: Token gate feature flag.
|
|
|
|
type: boolean
|
|
|
|
example: true
|
2022-08-31 19:38:35 +00:00
|
|
|
minter:
|
|
|
|
description: Minter feature flag.
|
|
|
|
type: boolean
|
|
|
|
example: true
|
|
|
|
subscriptions:
|
|
|
|
description: Subscriptions feature flag.
|
|
|
|
type: boolean
|
|
|
|
example: true
|
2022-01-26 00:17:10 +00:00
|
|
|
ipfs_gateway_url:
|
|
|
|
description: IPFS gateway URL.
|
|
|
|
type: string
|
2022-05-28 22:14:55 +00:00
|
|
|
nullable: true
|
2022-08-17 15:36:27 +00:00
|
|
|
Invoice:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: Invoice ID.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
sender_id:
|
|
|
|
description: The profile ID of the sender.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
recipient_id:
|
|
|
|
description: The profile ID of the recipient.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
payment_address:
|
|
|
|
description: Payment address.
|
|
|
|
type: string
|
2022-09-18 00:23:20 +00:00
|
|
|
amount:
|
|
|
|
description: Requested payment amount (in atomic units).
|
|
|
|
type: integer
|
|
|
|
example: 100000000
|
2022-09-07 10:43:50 +00:00
|
|
|
status:
|
|
|
|
description: Invoice status.
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- open
|
|
|
|
- paid
|
|
|
|
- forwarded
|
|
|
|
- timeout
|
2022-11-24 23:44:53 +00:00
|
|
|
expires_at:
|
|
|
|
description: The date when invoice times out.
|
|
|
|
type: string
|
|
|
|
format: date-time
|
2022-01-15 16:36:25 +00:00
|
|
|
Mention:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: The profile ID of the mentioned user.
|
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
username:
|
|
|
|
description: The username of the mentioned user.
|
|
|
|
type: string
|
|
|
|
acct:
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
description: The location of the mentioned user's profile.
|
|
|
|
type: string
|
2022-01-14 20:43:04 +00:00
|
|
|
Notification:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: The id of the notification in the database.
|
|
|
|
type: string
|
|
|
|
type:
|
|
|
|
description: The type of event that resulted in the notification.
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- follow
|
|
|
|
- follow_request
|
|
|
|
- reply
|
|
|
|
- favourite
|
|
|
|
- mention
|
|
|
|
- reblog
|
2022-05-28 22:14:55 +00:00
|
|
|
- subscription
|
2022-07-14 17:25:48 +00:00
|
|
|
- subscription_expiration
|
2022-10-22 19:19:57 +00:00
|
|
|
- move
|
2022-01-14 20:43:04 +00:00
|
|
|
example: reply
|
|
|
|
created_at:
|
|
|
|
description: The timestamp of the notification.
|
|
|
|
type: string
|
2022-11-24 23:44:53 +00:00
|
|
|
format: date-time
|
2022-01-14 20:43:04 +00:00
|
|
|
account:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
status:
|
|
|
|
$ref: '#/components/schemas/Account'
|
2022-01-03 18:13:16 +00:00
|
|
|
Relationship:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
2022-02-02 21:31:40 +00:00
|
|
|
description: Target profile id.
|
2022-01-03 18:13:16 +00:00
|
|
|
type: string
|
|
|
|
format: uuid
|
|
|
|
following:
|
|
|
|
description: Are you following this user?
|
|
|
|
type: boolean
|
2022-02-21 15:20:18 +00:00
|
|
|
default: false
|
2022-01-03 18:13:16 +00:00
|
|
|
followed_by:
|
|
|
|
description: Are you followed by this user?
|
|
|
|
type: boolean
|
2022-02-21 15:20:18 +00:00
|
|
|
default: false
|
2022-01-03 18:13:16 +00:00
|
|
|
requested:
|
|
|
|
description: Do you have a pending follow request for this user?
|
|
|
|
type: boolean
|
2022-02-21 15:20:18 +00:00
|
|
|
default: false
|
2022-02-03 15:21:16 +00:00
|
|
|
subscription_to:
|
|
|
|
description: Are you sending subscription payments to this user?
|
|
|
|
type: boolean
|
2022-02-21 15:20:18 +00:00
|
|
|
default: false
|
2022-02-03 15:21:16 +00:00
|
|
|
subscription_from:
|
|
|
|
description: Are you receiving subscription payments from this user?
|
|
|
|
type: boolean
|
2022-02-21 15:20:18 +00:00
|
|
|
default: false
|
|
|
|
showing_reblogs:
|
2022-03-09 20:37:14 +00:00
|
|
|
description: Are you receiving this user's reposts in your home timeline?
|
|
|
|
type: boolean
|
|
|
|
default: true
|
|
|
|
showing_replies:
|
|
|
|
description: Are you receiving this user's replies in your home timeline?
|
2022-02-21 15:20:18 +00:00
|
|
|
type: boolean
|
|
|
|
default: true
|
2023-01-19 13:13:49 +00:00
|
|
|
Role:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: The ID of the role in the database.
|
|
|
|
type: integer
|
|
|
|
example: 1
|
|
|
|
name:
|
|
|
|
description: The name of the role.
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- user
|
|
|
|
- admin
|
|
|
|
- read_only_user
|
|
|
|
permissions:
|
|
|
|
description: A list of all permissions granted to the role.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- create_follow_request
|
|
|
|
- create_post
|
2023-02-04 16:57:55 +00:00
|
|
|
- manage_subscription_options
|
2022-01-26 14:59:15 +00:00
|
|
|
Signature:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
v:
|
|
|
|
type: integer
|
|
|
|
format: int64
|
|
|
|
example: 27
|
|
|
|
r:
|
|
|
|
type: string
|
|
|
|
example: '6f61670e67bf72...'
|
|
|
|
s:
|
|
|
|
type: string
|
|
|
|
example: '6a5cb313907cd3...'
|
2021-12-03 15:29:50 +00:00
|
|
|
Status:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: string
|
|
|
|
format: uuid
|
2022-08-21 20:08:45 +00:00
|
|
|
uri:
|
|
|
|
description: URI of the post used for federation.
|
|
|
|
type: string
|
2022-05-11 12:50:36 +00:00
|
|
|
created_at:
|
|
|
|
description: The date when this post was created.
|
|
|
|
type: string
|
2022-11-24 23:44:53 +00:00
|
|
|
format: date-time
|
2022-05-11 12:50:36 +00:00
|
|
|
edited_at:
|
|
|
|
description: The date when this post was edited.
|
|
|
|
type: string
|
2022-11-24 23:44:53 +00:00
|
|
|
format: date-time
|
2022-05-11 12:50:36 +00:00
|
|
|
nullable: true
|
2022-08-21 20:08:45 +00:00
|
|
|
account:
|
|
|
|
description: The profile that authored this post.
|
|
|
|
$ref: '#/components/schemas/Account'
|
2021-12-12 13:38:10 +00:00
|
|
|
content:
|
2022-01-07 20:41:46 +00:00
|
|
|
description: HTML-encoded post content.
|
|
|
|
type: string
|
|
|
|
visibility:
|
|
|
|
description: Visibility of this post.
|
2022-01-15 23:21:13 +00:00
|
|
|
$ref: '#/components/schemas/Visibility'
|
2023-02-24 00:26:39 +00:00
|
|
|
spoiler_text:
|
|
|
|
description: Subject or summary line, below which post content is collapsed until expanded.
|
|
|
|
type: string
|
2022-02-23 17:40:10 +00:00
|
|
|
media_attachments:
|
|
|
|
description: Media that is attached to this post.
|
2022-08-21 20:08:45 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Attachment'
|
2022-01-15 16:36:25 +00:00
|
|
|
mentions:
|
|
|
|
description: Mentions of users within the post.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Mention'
|
2021-12-12 13:38:10 +00:00
|
|
|
tags:
|
2022-10-15 15:31:17 +00:00
|
|
|
description: Hashtags used within the post content.
|
2021-12-12 13:38:10 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Tag'
|
2023-01-16 22:40:03 +00:00
|
|
|
emojis:
|
|
|
|
description: Custom emoji to be used when rendering post content.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/CustomEmoji'
|
2022-10-15 15:31:17 +00:00
|
|
|
reblog:
|
|
|
|
description: The post being reposted.
|
|
|
|
type: object
|
2021-12-03 15:29:50 +00:00
|
|
|
ipfs_cid:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: 'bafkr...'
|
2021-12-03 18:44:01 +00:00
|
|
|
token_tx_id:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: '0x5fe80cdea7f...'
|
2022-10-15 15:31:17 +00:00
|
|
|
links:
|
|
|
|
description: Posts linked to this post.
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: object
|
2022-07-31 10:54:09 +00:00
|
|
|
Subscription:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
description: Subscription ID.
|
|
|
|
type: number
|
|
|
|
sender:
|
|
|
|
$ref: '#/components/schemas/Account'
|
|
|
|
sender_address:
|
|
|
|
description: Sender address.
|
|
|
|
type: string
|
2022-08-30 23:56:10 +00:00
|
|
|
nullable: true
|
2022-07-31 10:54:09 +00:00
|
|
|
example: '0xd8da6bf...'
|
2022-08-30 19:11:18 +00:00
|
|
|
expires_at:
|
|
|
|
description: The date when subscription expires.
|
|
|
|
type: string
|
2022-11-24 23:44:53 +00:00
|
|
|
format: date-time
|
2022-09-02 18:28:27 +00:00
|
|
|
SubscriptionOption:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
type:
|
|
|
|
description: Subscription type
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- ethereum
|
|
|
|
- monero
|
|
|
|
price:
|
|
|
|
description: Subscription price (only for Monero)
|
|
|
|
type: number
|
|
|
|
payout_address:
|
|
|
|
description: Payout address (only for Monero)
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- type
|
2021-12-12 13:38:10 +00:00
|
|
|
Tag:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
description: 'The value of the hashtag after the # sign.'
|
|
|
|
type: string
|
|
|
|
url:
|
|
|
|
description: A link to the hashtag on the instance.
|
2022-01-15 23:21:13 +00:00
|
|
|
Visibility:
|
|
|
|
type: string
|
|
|
|
enum:
|
|
|
|
- public
|
|
|
|
- private
|
|
|
|
- subscribers
|
|
|
|
- direct
|