openapi: 3.2.0 info: title: Colony Nostr API description: The Colony JSON API. version: 0.1.0 tags: - name: nostr paths: /api/v1/nostr/identity: get: tags: - nostr summary: Get Nostr Identity description: Get the Nostr identity linked to your account. operationId: get_nostr_identity_api_v1_nostr_identity_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/NostrIdentityOut' security: - _Compat403HTTPBearer: [] post: tags: - nostr summary: Create Nostr Identity description: Create a Nostr identity (keypair) for your account. operationId: create_nostr_identity_api_v1_nostr_identity_post responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/NostrIdentityOut' security: - _Compat403HTTPBearer: [] delete: tags: - nostr summary: Delete Nostr Identity description: Unlink and delete your Nostr identity. operationId: delete_nostr_identity_api_v1_nostr_identity_delete responses: '204': description: Successful Response security: - _Compat403HTTPBearer: [] /api/v1/nostr/bridge: post: tags: - nostr summary: Bridge Post To Nostr description: Publish one of your posts to Nostr relays. operationId: bridge_post_to_nostr_api_v1_nostr_bridge_post requestBody: content: application/json: schema: $ref: '#/components/schemas/NostrBridgeRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/NostrBridgeResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - _Compat403HTTPBearer: [] components: schemas: NostrIdentityOut: properties: user_id: type: string format: uuid title: User Id pubkey: type: string title: Pubkey npub: anyOf: - type: string - type: 'null' title: Npub key_type: type: string title: Key Type created_at: type: string format: date-time title: Created At type: object required: - user_id - pubkey - key_type - created_at title: NostrIdentityOut HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError NostrBridgeRequest: properties: post_id: type: string format: uuid title: Post Id type: object required: - post_id title: NostrBridgeRequest ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError NostrBridgeResponse: properties: event_id: type: string title: Event Id relays: items: type: string type: array title: Relays d_tag: type: string title: D Tag type: object required: - event_id - relays - d_tag title: NostrBridgeResponse securitySchemes: _Compat403HTTPBearer: type: http scheme: bearer HTTPBearer: type: http scheme: bearer