{"openapi":"3.0.0","info":{"title":"Survio API","description":"Survio API (beta) in Open API format. The authorization to API si done using <b>Authorization<\/b> header. The format is: <b>Authorization: Bearer \\<token\\><\/b>. Contact Survio via email to get API token.","termsOfService":"https:\/\/www.survio.com\/en\/terms-and-conditions","contact":{"name":"Survio","url":"https:\/\/survio.com","email":"support@survio.com"},"version":"0.1.0"},"servers":[{"url":"\/v2","description":""}],"paths":{"\/api\/survey":{"get":{"operationId":"list_all_surveys","tags":["survey"],"responses":{"200":{"description":"survey collection","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/survey.ListSurveyOutput"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/survey.ListSurveyOutput"}}}}}},"summary":"Retrieves the collection of survey resources.","description":"Retrieves the collection of survey resources.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"parameters":[]},"\/api\/survey\/{id}\/responses":{"get":{"operationId":"list_survey_responses","tags":["response"],"responses":{"200":{"description":"response collection","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/response.ExternalResponsesOutput"}}},"text\/html":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/response.ExternalResponsesOutput"}}}}}},"summary":"Retrieves the collection of response resources.","description":"Retrieves the collection of response resources.","parameters":[{"name":"id","in":"path","description":"Survey ID","required":true,"deprecated":false,"allowEmptyValue":false,"schema":[],"style":"simple","explode":false,"allowReserved":false},{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer","default":1},"style":"form","explode":false,"allowReserved":false},{"name":"sourceId[]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["FB_WALL","EMAIL","TWITTER","WEB_LINK","IFRAME","DIRECT","CINT","POPUP","LINKEDIN","GPLUS","VKONTAKTE","QR_CODE","POPOVER","WHATSAPP","SOC_NETWORK","IN_APP"]},"style":"form","explode":false,"allowReserved":false},{"name":"langCode[]","in":"query","description":"Filter responses by language code(s), e.g. en, cs.","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"array","items":{"type":"string","example":"en"}},"style":"form","explode":true,"allowReserved":false},{"name":"submitted_at[before]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"submitted_at[strictly_before]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"submitted_at[after]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"submitted_at[strictly_after]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string"},"style":"form","explode":false,"allowReserved":false},{"name":"completion_time[lower_than]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer"},"style":"form","explode":false,"allowReserved":false},{"name":"completion_time[strictly_lower_than]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer"},"style":"form","explode":false,"allowReserved":false},{"name":"completion_time[strictly_greater_than]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer"},"style":"form","explode":false,"allowReserved":false},{"name":"completion_time[greater_than]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer"},"style":"form","explode":false,"allowReserved":false},{"name":"completion_time[equal]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"integer"},"style":"form","explode":false,"allowReserved":false},{"name":"order[submitted_at]","in":"query","description":"","required":false,"deprecated":false,"allowEmptyValue":true,"schema":{"type":"string","enum":["asc","desc"]},"style":"form","explode":false,"allowReserved":false}],"deprecated":false},"parameters":[]},"\/api\/survey\/{id}\/send-invitation":{"post":{"operationId":"api_send_email","tags":["survey"],"responses":{"201":{"description":"survey resource created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/survey.OKOutput"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/survey.OKOutput"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a survey resource.","description":"Creates a survey resource.","parameters":[{"name":"id","in":"path","description":"","required":true,"deprecated":false,"allowEmptyValue":false,"schema":[],"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The new survey resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/survey.SendEmailInvitation"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/survey.SendEmailInvitation"}}},"required":true},"deprecated":false},"parameters":[]},"\/api\/survey\/{id}\/send-invitation\/batch":{"post":{"operationId":"api_batch_send_email_batch","tags":["survey"],"responses":{"201":{"description":"survey resource created","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/survey.OKOutput"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/survey.OKOutput"}}},"links":{}},"400":{"description":"Invalid input"},"422":{"description":"Unprocessable entity"}},"summary":"Creates a survey resource.","description":"Creates a survey resource.","parameters":[{"name":"id","in":"path","description":"","required":true,"deprecated":false,"allowEmptyValue":false,"schema":[],"style":"simple","explode":false,"allowReserved":false}],"requestBody":{"description":"The new survey resource","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/survey.SendEmailInvitationBatch"}},"text\/html":{"schema":{"$ref":"#\/components\/schemas\/survey.SendEmailInvitationBatch"}}},"required":true},"deprecated":false},"parameters":[]}},"components":{"schemas":{"Answer":{"type":"object","description":"","deprecated":false,"properties":{"ids":{"type":"array","items":{"type":"integer"}},"labels":{"type":"array","items":{"type":"string"}},"value":{"type":"string","nullable":true,"items":{"type":"string"}}}},"Answers":{"type":"object","description":"","deprecated":false,"properties":{"question":{"$ref":"#\/components\/schemas\/Question"},"answer":{"oneOf":[{"type":"string"},{"type":"integer"},{"$ref":"#\/components\/schemas\/Answer"},{"type":"array","items":{"$ref":"#\/components\/schemas\/Answer"}}],"$ref":"","anyOf":[{"$ref":"#\/components\/schemas\/Answer"}],"nullable":true}}},"Question":{"type":"object","description":"","deprecated":false,"properties":{"id":{"type":"integer"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","DATE","PLACE","EMAIL","NUMBER","MATRIX_TEXT","MATRIX_MULTIPLE_CHOICE","MATRIX_SINGLE_CHOICE","NPS","IMAGE_MULTIPLE_CHOICE","IMAGE_SINGLE_CHOICE","RATING","DIVIDE_POINTS","SEMANTIC_DIFFERENTIAL","SORTING","SINGLE_CHOICE","MULTIPLE_CHOICE"]}}},"response.ExternalResponsesOutput":{"type":"object","description":"","deprecated":false,"properties":{"id":{"deprecated":true,"type":"integer"},"responseId":{"type":"integer"},"surveyId":{"type":"string"},"submitted":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email","nullable":true},"source":{"type":"string","enum":["FB_WALL","EMAIL","TWITTER","WEB_LINK","IFRAME","DIRECT","CINT","POPUP","LINKEDIN","GPLUS","VKONTAKTE","QR_CODE","POPOVER","WHATSAPP","SOC_NETWORK","IN_APP"]},"langCode":{"type":"string","nullable":false,"description":"Language code in which the response was filled in"},"parameters":{"type":"object","additionalProperties":{"type":"string"}},"answers":{"type":"array","items":{"$ref":"#\/components\/schemas\/Answers"}}}},"survey.ListSurveyOutput":{"type":"object","description":"","deprecated":false,"properties":{"surveyId":{"type":"string"},"surveyTitle":{"type":"string"}}},"survey.OKOutput":{"type":"object","description":"","deprecated":false,"properties":{"ok":{"type":"boolean"}}},"survey.SendEmailInvitation":{"type":"object","description":"","deprecated":false,"required":["email"],"properties":{"email":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"}}},"survey.SendEmailInvitationBatch":{"type":"object","description":"","deprecated":false,"required":["emails"],"properties":{"emails":{"type":"array","items":{"format":"email","externalDocs":{"url":"https:\/\/schema.org\/email"},"type":"string"}}}}},"responses":{},"parameters":{},"examples":{},"requestBodies":{},"headers":{},"securitySchemes":{"bearerAuth":{"type":"http","description":"Value for the Authorization header parameter.","name":"Authorization","in":"header","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"bearerAuth":[]}],"tags":[]}