{"openapi":"3.1.0","info":{"title":"Better Giving API","version":"1.0.0","description":"Public reads need no key. Connector v1 acts for one nonprofit with a key sent as `Authorization: Bearer <key>`. Public errors are `{\"error\": {\"code\", \"message\"}}`; connector errors are `application/problem+json` carrying the same `error` object.","contact":{"name":"Better Giving","url":"https://better.giving/agents"}},"servers":[{"url":"https://better.giving"}],"tags":[{"name":"public","description":"Unauthenticated public reads."},{"name":"connector","description":"Connector v1: a nonprofit's campaigns, forms and gifts."}],"paths":{"/api/npos":{"get":{"operationId":"search_nonprofits","summary":"Search nonprofits","parameters":[{"name":"query","in":"query","required":false,"description":"Free-text search over nonprofit names and descriptions.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"1-based page number.","schema":{"type":"string"}},{"name":"endow_designation","in":"query","required":false,"description":"Comma-separated organization designations.","schema":{"type":"string"}},{"name":"sdgs","in":"query","required":false,"description":"Comma-separated UN Sustainable Development Goal numbers (1-17).","schema":{"type":"string"}},{"name":"kyc_only","in":"query","required":false,"description":"Comma-separated `true`/`false`: donor KYC required.","schema":{"type":"string"}},{"name":"fund_opt_in","in":"query","required":false,"description":"Comma-separated `true`/`false`: opted into fundraisers.","schema":{"type":"string"}},{"name":"published","in":"query","required":false,"description":"Comma-separated `true`/`false`: listed on the marketplace.","schema":{"type":"string"}},{"name":"countries","in":"query","required":false,"description":"Comma-separated headquarters countries.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated fields each item carries.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of nonprofits.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Api400"},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/npos/{id}":{"get":{"operationId":"get_nonprofit","summary":"Get a nonprofit by id or slug","parameters":[{"name":"id","in":"path","required":true,"description":"The nonprofit's numeric id, or its slug.","schema":{"anyOf":[{"type":"string","pattern":"^[1-9]\\d*$"},{"type":"string","maxLength":30,"pattern":"^(?!^\\d+$)","allOf":[{"pattern":"^[a-zA-Z0-9-._~]+$"}]}]}}],"responses":{"200":{"description":"The nonprofit's public profile.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Api400"},"404":{"$ref":"#/components/responses/Api404"},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/npos/ein/{id}":{"get":{"operationId":"get_nonprofit_by_ein","summary":"Get a nonprofit by registration number (EIN)","parameters":[{"name":"id","in":"path","required":true,"description":"Registration number, letters and digits only, or a US EIN as NN-NNNNNNN.","schema":{"anyOf":[{"type":"string","pattern":"^\\d{2}-\\d{7}$"},{"type":"string","minLength":1,"pattern":"^[a-zA-Z0-9]+$"}]}}],"responses":{"200":{"description":"The nonprofit with this registration number.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Api400"},"404":{"$ref":"#/components/responses/Api404"},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/currencies":{"get":{"operationId":"list_currencies","summary":"List donation currencies with USD rates","responses":{"200":{"description":"Supported currencies, with the caller's preferred one.","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/tickers":{"get":{"operationId":"search_tickers","summary":"Search stock tickers accepted as gifts","parameters":[{"name":"q","in":"query","required":false,"description":"Fuzzy search. Without it, the first 10 are returned.","schema":{"type":"string"}}],"responses":{"200":{"description":"Up to 10 tickers.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/tickers/{symbol}/estimate":{"get":{"operationId":"estimate_ticker","summary":"Get the price and minimum gift for a stock ticker","parameters":[{"name":"symbol","in":"path","required":true,"description":"Ticker symbol.","schema":{"type":"string"}}],"responses":{"200":{"description":"The minimum gift in shares and the USD price.","content":{"application/json":{"schema":{"type":"object","required":["min","usdpu"],"properties":{"min":{"type":"number","description":"Minimum gift, in shares or tokens."},"usdpu":{"type":"number","description":"USD per unit."}}}}}},"404":{"$ref":"#/components/responses/Api404"},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/tokens":{"get":{"operationId":"search_tokens","summary":"Search crypto tokens accepted as gifts","parameters":[{"name":"q","in":"query","required":false,"description":"Fuzzy search. Without it, the first 10 are returned.","schema":{"type":"string"}}],"responses":{"200":{"description":"Up to 10 tokens.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/tokens/{code}/estimate":{"get":{"operationId":"estimate_token","summary":"Get the price and minimum gift for a crypto token","parameters":[{"name":"code","in":"path","required":true,"description":"Token code.","schema":{"type":"string"}}],"responses":{"200":{"description":"The minimum gift in tokens and the USD price.","content":{"application/json":{"schema":{"type":"object","required":["min","usdpu"],"properties":{"min":{"type":"number","description":"Minimum gift, in shares or tokens."},"usdpu":{"type":"number","description":"USD per unit."}}}}}},"404":{"$ref":"#/components/responses/Api404"},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/api/top-countries":{"get":{"operationId":"list_top_countries","summary":"List the countries giving the most this week","responses":{"200":{"description":"Up to 10 country names.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"500":{"$ref":"#/components/responses/Api500"}},"tags":["public"],"security":[]}},"/connector/v1/hello":{"get":{"operationId":"hello","summary":"Get the connector contract and the actions served","security":[],"responses":{"200":{"description":"The contract.","content":{"application/json":{"schema":{"type":"object","required":["service","contract","release","name","actions"],"properties":{"service":{"const":"better-giving"},"contract":{"const":1},"release":{"type":"string"},"name":{"type":"string"},"actions":{"type":"array","items":{"type":"string","enum":["hello","exchange","disconnect","list_campaigns","get_campaign","create_campaign","update_campaign_settings","update_campaign_blocks","publish_campaign","end_campaign","get_donation_page","get_block_catalog","list_forms","get_form","create_form","update_form","get_results","list_donations","list_donors","get_donor","list_recurring_gifts","create_photo_upload_link"]}}}}}}},"404":{"$ref":"#/components/responses/Problem404"},"429":{"$ref":"#/components/responses/Problem429"}},"tags":["connector"]}},"/connector/v1/exchange":{"post":{"operationId":"exchange","summary":"Exchange an authorization code for an API key","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]}}}},"responses":{"200":{"description":"The API key and the nonprofit's name.","content":{"application/json":{"schema":{"type":"object","required":["key","name"],"properties":{"key":{"type":"string"},"name":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/Problem400"},"404":{"$ref":"#/components/responses/Problem404"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/disconnect":{"post":{"operationId":"disconnect","summary":"Revoke the calling API key","security":[{"connectorKey":[]}],"responses":{"204":{"description":"Revoked."},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/campaigns":{"get":{"operationId":"list_campaigns","summary":"List campaigns","security":[{"connectorKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","published","ended"],"description":"Only campaigns in this state."}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Page size."}}],"responses":{"200":{"description":"List campaigns","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]},"post":{"operationId":"create_campaign","summary":"Create a draft campaign","security":[{"connectorKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"One logical write per key for 24 hours; a retry with the same key and body replays the first answer.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":200}}}}}},"responses":{"200":{"description":"A retry with the same Idempotency-Key, replaying the first answer.","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Problem400"},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/campaigns/{id}":{"get":{"operationId":"get_campaign","summary":"Get a campaign","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The campaign id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Get a campaign","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/campaigns/{id}/settings":{"patch":{"operationId":"update_campaign_settings","summary":"Change a campaign's goal or end date","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The campaign id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{"goal":{"description":"`{amount, currency: \"USD\"}`, or null for no goal.","type":["object","null"]},"end_date":{"description":"Last day, YYYY-MM-DD, or null for no end.","type":["string","null"]},"time_zone":{"description":"Send it back as read; this action can't change it."},"sharing":{"description":"Send it back as read; this action can't change it."},"expected_version":{"type":"string","pattern":"^\\d{1,19}$","description":"The `version` you read. If the campaign changed since, the write is a 409 `stale_read`."}}}}}},"responses":{"200":{"description":"The resource after the change.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/campaigns/{id}/blocks":{"patch":{"operationId":"update_campaign_blocks","summary":"Change a campaign page's blocks","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The campaign id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["blocks"],"properties":{"blocks":{"type":"array","items":{"type":"object"}},"expected_version":{"type":"string","pattern":"^\\d{1,19}$","description":"The `version` you read. If the campaign changed since, the write is a 409 `stale_read`."}}}}}},"responses":{"200":{"description":"The resource after the change.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/campaigns/{id}/publish":{"post":{"operationId":"publish_campaign","summary":"Publish a campaign","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The campaign id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{"gifts_go_to":{"description":"Campaigns: a program id, or null for the general fund. Forms: as `get_form` shows it."}}}}}},"responses":{"200":{"description":"The resource after the change.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/campaigns/{id}/end":{"post":{"operationId":"end_campaign","summary":"End a campaign","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The campaign id.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{}}}}},"responses":{"200":{"description":"The resource after the change.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/donation-page":{"get":{"operationId":"get_donation_page","summary":"Get the nonprofit's donation page","security":[{"connectorKey":[]}],"parameters":[],"responses":{"200":{"description":"Get the nonprofit's donation page","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/blocks/catalog":{"get":{"operationId":"get_block_catalog","summary":"List the blocks a campaign page can hold","security":[{"connectorKey":[]}],"parameters":[],"responses":{"200":{"description":"List the blocks a campaign page can hold","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/forms":{"get":{"operationId":"list_forms","summary":"List donation forms","security":[{"connectorKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Page size."}}],"responses":{"200":{"description":"List donation forms","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]},"post":{"operationId":"create_form","summary":"Create a donation form","security":[{"connectorKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional. When sent, a retry with the same key and body replays the first answer, as on `create_campaign`.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"suggested_amounts":{"type":"array"},"frequencies":{"type":"array","items":{"type":"string"}},"donate_methods":{"type":"array","items":{"type":"string"}},"gifts_go_to":{"description":"Campaigns: a program id, or null for the general fund. Forms: as `get_form` shows it."},"id":{"description":"Send it back as read; this action can't change it."},"campaign_id":{"description":"Send it back as read; this action can't change it."},"updated_at":{"type":"string","description":"The `updated_at` you read. If the form changed since, the write is a 409 `stale_read`."},"minimum":{"description":"Send it back as read; this action can't change it."},"maximum":{"description":"Send it back as read; this action can't change it."},"allowed_origins":{"description":"Send it back as read; this action can't change it."}}}}}},"responses":{"200":{"description":"A retry with the same Idempotency-Key, replaying the first answer.","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Problem400"},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/forms/{id}":{"get":{"operationId":"get_form","summary":"Get a donation form","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The form id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Get a donation form","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]},"patch":{"operationId":"update_form","summary":"Change a donation form","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The form id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":[],"properties":{"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"suggested_amounts":{"type":"array"},"frequencies":{"type":"array","items":{"type":"string"}},"donate_methods":{"type":"array","items":{"type":"string"}},"gifts_go_to":{"description":"Campaigns: a program id, or null for the general fund. Forms: as `get_form` shows it."},"id":{"description":"Send it back as read; this action can't change it."},"campaign_id":{"description":"Send it back as read; this action can't change it."},"updated_at":{"type":"string","description":"The `updated_at` you read. If the form changed since, the write is a 409 `stale_read`."},"minimum":{"description":"Send it back as read; this action can't change it."},"maximum":{"description":"Send it back as read; this action can't change it."},"allowed_origins":{"description":"Send it back as read; this action can't change it."},"confirm":{"const":true,"description":"Confirms a change donors will see."}}}}}},"responses":{"200":{"description":"The resource after the change.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/results":{"get":{"operationId":"get_results","summary":"Get fundraising totals","security":[{"connectorKey":[]}],"parameters":[{"name":"campaign_id","in":"query","required":false,"schema":{"type":"string","description":"Only this campaign's gifts."}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"First day, UTC."}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Last day, UTC."}}],"responses":{"200":{"description":"Get fundraising totals","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/donations":{"get":{"operationId":"list_donations","summary":"List donations","security":[{"connectorKey":[]}],"parameters":[{"name":"campaign_id","in":"query","required":false,"schema":{"type":"string","description":"Only this campaign's gifts."}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date","description":"First day, UTC."}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date","description":"Last day, UTC."}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Page size."}}],"responses":{"200":{"description":"List donations","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/donors":{"get":{"operationId":"list_donors","summary":"List donors","security":[{"connectorKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"description":"Name or email search."}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Page size."}}],"responses":{"200":{"description":"List donors","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/donors/{id}":{"get":{"operationId":"get_donor","summary":"Get a donor and their gifts","security":[{"connectorKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The donor id.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Page size."}}],"responses":{"200":{"description":"Get a donor and their gifts","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/recurring":{"get":{"operationId":"list_recurring_gifts","summary":"List recurring gifts","security":[{"connectorKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Page size."}}],"responses":{"200":{"description":"List recurring gifts","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}},"/connector/v1/photos/upload-link":{"post":{"operationId":"create_photo_upload_link","summary":"Create a one-time link for uploading a campaign photo","security":[{"connectorKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["target"],"properties":{"target":{"type":"string","description":"The campaign id."},"slot":{"const":"hero"}}}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","required":["url","expires_at"],"properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}}}}}},"401":{"$ref":"#/components/responses/Problem401"},"404":{"$ref":"#/components/responses/Problem404"},"409":{"$ref":"#/components/responses/Problem409"},"422":{"$ref":"#/components/responses/Problem422"},"429":{"$ref":"#/components/responses/Problem429"},"500":{"$ref":"#/components/responses/Problem500"}},"tags":["connector"]}}},"components":{"securitySchemes":{"connectorKey":{"type":"http","scheme":"bearer","description":"A connector API key, from `/connector/v1/exchange`."}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","method_not_allowed","rate_limited","internal_error"]},"message":{"type":"string"}}}}},"ConnectorProblem":{"type":"object","description":"RFC 9457 problem details, plus `error` in the public API's shape.","required":["code","status","error"],"properties":{"code":{"type":"string","enum":["unknown_action","key_refused","rate_limited","code_invalid","idempotency_key_required","idempotency_conflict","idempotency_in_progress","internal_error","invalid","not_found","write_failed","campaign_ended","already_published","confirm_required","stale_read"]},"status":{"type":"integer"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unknown_action","key_refused","rate_limited","code_invalid","idempotency_key_required","idempotency_conflict","idempotency_in_progress","internal_error","invalid","not_found","write_failed","campaign_ended","already_published","confirm_required","stale_read"]},"message":{"type":"string"}}}}}},"responses":{"Api400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Api404":{"description":"Nothing matches this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Api500":{"description":"Better Giving hit an error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Problem400":{"description":"The request is malformed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}},"Problem401":{"description":"The API key is missing or no longer valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}},"Problem404":{"description":"Nothing matches this request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}},"Problem409":{"description":"The request conflicts with the resource's current state.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}},"Problem422":{"description":"The request failed validation; `errors` names each field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}},"Problem429":{"description":"Too many requests. Wait, then retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}},"Problem500":{"description":"Better Giving hit an error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConnectorProblem"}}}}}}}