# Certificates

## Create Certificate

> Creates a new certificate for use with connector authentication.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Certificates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"CertificatesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Certificates"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"string"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"type":"object"},"user":{"type":"object"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"CertificatesStoreRequest":{"type":"object","properties":{"connector_id":{"type":"string","nullable":true},"certificate":{"type":"string"},"passphrase":{"type":"string","maxLength":1000,"nullable":true}},"required":["certificate"]}}},"paths":{"/api/v1/certificates":{"post":{"summary":"Create Certificate","description":"Creates a new certificate for use with connector authentication.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificatesResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificatesStoreRequest"}}}},"tags":["Certificates"],"parameters":[]}}}}
```

## Delete Certificate

> Permanently deletes a specific certificate.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Certificates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/certificates/{certificate}":{"delete":{"summary":"Delete Certificate","description":"Permanently deletes a specific certificate.","parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"string"},"description":"The certificate identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Certificates"]}}}}
```
