Przejdź do treści
Influence
Esc
↑↓nawigacja↵otwórz⌘Jpodgląd

Potwierdź przesłanie obrazu w postaci binarnej

Potwierdź przygotowany deskryptor przesyłania mediaImport za pomocą oryginalnych bajtów JPEG, PNG lub WebP (maksymalnie 3 145 728 bajtów). Liczba bajtów i SHA-256 muszą być zgodne z deskryptorem. Dla odwołań do plików lub większych plików lokalnych użyj udokumentowanych narzędzi multimediów i wieloczęściowego przesyłania przez SDK.

POST/api/v1/media/import
Autoryzacja
AuthorizationToken Bearer · headerwymagane

Klucz API Influence o ograniczonym zakresie uprawnień lub obsługiwany token dostępu OAuth. Nie umieszczaj danych uwierzytelniających w adresach URL ani danych wejściowych narzędzi.

Parametry nagłówka
X-Publish-ConfirmationConfirmationCapabilitywymagane

Dokładna wartość confirmationCapability zwrócona przez prepare. Wyślij ją tylko w tym nagłówku, z tymi samymi danymi wejściowymi, przed expiresAt.

min. długość: 32 · maks. długość: 4096 · pasuje do wzorca ^[A-Za-z0-9._~-]+$
Idempotency-KeyIdempotencyKeywymagane

Identyfikator ponowienia wygenerowany przez wywołującego. Po niepewnej odpowiedzi zachowaj ten klucz, wartość confirmationCapability i dane wejściowe.

min. długość: 16 · maks. długość: 200 · pasuje do wzorca ^[A-Za-z0-9._:-]+$
X-Publish-Uploadstringwymagane

encodeURIComponent(JSON.stringify(upload)) z przygotowanych danych wejściowych mediaImport. Zdekodowany obiekt jest zgodny z BinaryUploadDescriptor; zakodowany nagłówek ma maksymalnie 4096 znaków.

maks. długość: 4096
Treść żądania
wymaganeapplication/octet-stream
string<binary>
Odpowiedzi
200

Wynik operacji na multimediach; sprawdź ok i status zasobu.

Dokładnie jeden z:
object
okbooleanwymagane
outputJsonValue | nullwymagane
Pokaż właściwości
Co najmniej jeden z:
string
string
number
number
boolean
boolean
null
null
JsonValue[]
Tablica elementów typu JsonValue
Odwołanie cykliczne do JsonValue.
object
object
toolNamestringwymagane
Dozwolone wartości:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
ToolError
errorobjectwymagane
Pokaż właściwości
codestringwymagane
Dozwolone wartości:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestringwymagane
min. długość: 1 · maks. długość: 2048
retryablebooleanwymagane
okbooleanwymagane
toolNamestringwymagane
Dozwolone wartości:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
400

Nieprawidłowe żądanie. Parametry zapytania nie są przyjmowane. Błędy walidacji narzędzia mogą mieć strukturę odpowiedzi błędu narzędzia.

Co najmniej jeden z:
TransportError
errorobjectwymagane
Pokaż właściwości
codestringwymagane
messagestringwymagane
retryablebooleanwymagane
ToolError
errorobjectwymagane
Pokaż właściwości
codestringwymagane
Dozwolone wartości:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestringwymagane
min. długość: 1 · maks. długość: 2048
retryablebooleanwymagane
okbooleanwymagane
toolNamestringwymagane
Dozwolone wartości:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
401

Nie podano danych uwierzytelniających Bearer albo są one nieprawidłowe lub wygasły.

errorobjectwymagane
Pokaż właściwości
codestringwymagane
messagestringwymagane
retryablebooleanwymagane
403

Dane uwierzytelniające nie obejmują wymaganych uprawnień.

errorobjectwymagane
Pokaż właściwości
codestringwymagane
messagestringwymagane
retryablebooleanwymagane
404

API dla klientów maszynowych lub żądane narzędzie jest niedostępne.

errorobjectwymagane
Pokaż właściwości
codestringwymagane
messagestringwymagane
retryablebooleanwymagane
413

Żądanie przekracza limit bajtów.

errorobjectwymagane
Pokaż właściwości
codestringwymagane
Dozwolone wartości:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestringwymagane
min. długość: 1 · maks. długość: 2048
retryablebooleanwymagane
okbooleanwymagane
toolNamestringwymagane
Dozwolone wartości:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
429

Przekroczono limit częstotliwości żądań. Ten błąd pozwala na ponowienie próby.

errorobjectwymagane
Pokaż właściwości
codestringwymagane
messagestringwymagane
retryablebooleanwymagane
503

API lub jego zaplecze wykonawcze jest niedostępne.

errorobjectwymagane
Pokaż właściwości
codestringwymagane
messagestringwymagane
retryablebooleanwymagane
Żądanie
curl -X POST 'https://influence.so/api/v1/media/import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Publish-Confirmation: stringstringstringstringstringst' \
  -H 'Idempotency-Key: stringstringstri' \
  -H 'X-Publish-Upload: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/octet-stream' \
  -d 'string'
Odpowiedź
{
  "ok": true,
  "output": "string",
  "toolName": "adAuditQuote"
}