post
Block a domain

https://CounterSocial.example/api/v1/domain_blocks

Block a domain to:

Returns: n/a
OAuth: User token + ****write:blocks or follow
Version:
1.4.0 - added

Request

Headers
Authorization
required
string
Bearer
Form Data Parameters
domain
required
string
Domain to block.

Response

200: Success

If the call was successful, an empty object will be returned. Note that the call will be successful even if the domain is already blocked or if the domain does not exist or if the domain is not a domain.

{}

401: Unauthorized

Incorrect Authorization header

{
  "error": "The access token is invalid"
}

422: Unprocessable Entity

If domain is not provided or contains spaces, the request will fail.

empty

{
  "error": "Validation failed: Domain can't be blank"
}
invalid
{
  "error": "Validation failed: Domain is not a valid domain name"
}

delete
Unblock a domain

https://CounterSocial.example/api/v1/domain_blocks

Remove a domain block, if it exists in the user's array of blocked domains.

Returns: n/a
OAuth: User token + write:blocks or follow
Version history:
1.4.0 - added

Request

Headers
Authorization
required
string
Bearer
Form Data Parameters
domain
required
string
Domain to unblock.

Response

200: Success

If the call was successful, an empty object will be returned. Note that the call will be successful even if the domain was not previously blocked.

{}

401: Unauthorized

Incorrect Authorization header

{
  "error": "The access token is invalid"
}

422: Unprocessable Entity

If domain is not provided or contains spaces, the request will fail.

empty

{
  "error": "Validation failed: Domain can't be blank"
}
invalid domain
{
  "error": "Validation failed: Domain is not a valid domain name"
}

Last updated December 27, 2020 ?? Improve this page