openapi: 3.2.0 info: version: 1.0.0 description: Identify your most influential customers and activate them to drive more conversions on social. title: MAVRCK.IO Authentication API servers: - url: http://app.splashscore.com/v1 - url: https://app.splashscore.com/v1 security: - apiKey: [] tags: - name: Authentication paths: /api-key/facebook: post: tags: - Authentication x-handler: auth/facebook_controller.js summary: Pass Facebook access grant information in exchange for a JWT to include in the header of requests. parameters: - name: ^mdp_.+$ in: query required: false description: Pass in data points on sign-up, in the format mdp_{data_point_definition_key} schema: type: string responses: '200': description: User info content: application/json: schema: properties: expiresAt: type: string format: date-time rejection: $ref: '#/components/schemas/MembershipRejection' profile: $ref: '#/components/schemas/Profile' token: type: string '400': description: Missing/invalid parameter content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - communityId properties: communityId: type: string accessToken: type: string code: type: string description: Authorization code from beginning of the OAuth flow. redirectUri: type: string description: Redirect URI that facebook should redirect to after authorization. Must match the redirect URI from the first part of the flow. referralSourceDomain: type: string description: The domain that the user came from when they logged in for the first time referringURL: type: string utmSource: type: string utmMedium: type: string utmTerm: type: string utmContent: type: string utmCampaign: type: string phone: type: string abTestVariations: type: array items: type: object properties: name: type: string variation: type: string facebookPageIds: type: array items: type: string shouldAddPages: type: boolean required: true /auto-login: post: tags: - Authentication x-handler: auth/influencer_auto_login/influencer_auto_login_controller.js summary: Pass encrypted user key in exchange for a JWT to include in the header of requests. responses: '200': description: User info content: application/json: schema: properties: expiresAt: type: string format: date-time rejection: $ref: '#/components/schemas/MembershipRejection' profile: $ref: '#/components/schemas/Profile' token: type: string '400': description: Missing/invalid parameter content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Member not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - key properties: key: type: string description: Encrypted user key actionGroupId: type: integer required: true /connected-account/instagram-business: post: tags: - Authentication x-handler: auth/instagram_business_controller.js summary: Pass Facebook access grant information in exchange for a JWT to include in the header of requests. x-access: - influencer responses: '200': description: All Instagram Profiles and Facebook Profiles content: application/json: schema: properties: token: type: string instagramProfiles: type: array items: $ref: '#/components/schemas/InstagramConnectionInfo' facebookProfiles: type: array items: $ref: '#/components/schemas/FacebookProfileDeprecated' '400': description: Missing/invalid parameter content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Session expired. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - communityId properties: communityId: type: string accessToken: type: string code: type: string description: Authorization code from beginning of the OAuth flow. redirectUri: type: string description: Redirect URI that facebook should redirect to after authorization. Must match the redirect URI from the first part of the flow. facebookPageIds: type: array items: type: string required: true /email-auth/lookup: post: tags: - Authentication x-handler: email_auth/email_auth_lookup_controller.js summary: Pass an email and check if it needs verification or existing login credentials submitted in order to proceed parameters: - name: ^mdp_.+$ in: query required: false description: Pass in data points on sign-up, in the format mdp_{data_point_definition_key} schema: type: string responses: '200': description: Email was found. content: application/json: schema: type: object properties: status: type: string description: Status of the next step for the client to perform. enum: - userOwnsEmail - loginCredentialsRequired - emailVerificationRequestInitiated - emailOwnedByAnotherUser '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - communityId - email properties: communityId: type: string email: type: string actionGroupId: type: integer referralSourceDomain: type: string description: The domain that the user came from when they logged in for the first time redirectUrl: type: string referringURL: type: string utmSource: type: string utmMedium: type: string utmTerm: type: string utmContent: type: string utmCampaign: type: string required: true /email-auth/signup: post: tags: - Authentication x-handler: email_auth/email_auth_signup_controller.js summary: Pass an email verification request key and new password in exchange for a JWT to include in the header of requests. responses: '200': description: User Info. content: application/json: schema: type: object properties: status: type: string description: Status of the next step for the client to perform. enum: - loginCredentialsExist - authenticationRequired - createLoginCredentialsRequired - usersDoNotMatch authenticationOptions: type: array description: If authentication is required before proceeding present what types of login are acceptable (facebook or/and email) items: type: string enum: - facebook - email profile: $ref: '#/components/schemas/Profile' token: type: string '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - key - password properties: key: type: string password: type: string required: true /email-auth/login: post: tags: - Authentication x-handler: email_auth/email_auth_login_controller.js summary: Pass an email and password in exchange for a JWT to include in the header of requests. parameters: - name: ^mdp_.+$ in: query required: false description: Pass in data points on sign-up, in the format mdp_{data_point_definition_key} schema: type: string responses: '200': description: User Info. content: application/json: schema: type: object properties: profile: $ref: '#/components/schemas/Profile' token: type: string rejection: $ref: '#/components/schemas/MembershipRejection' '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: User not found. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - communityId - email - password properties: communityId: type: string email: type: string password: type: string required: true /email-auth/forgot-password: post: tags: - Authentication x-handler: email_auth/email_auth_forgot_password_controller.js summary: Initiate a forgot password password request responses: '200': description: Forgot password email sent. content: application/json: schema: $ref: '#/components/schemas/EmptyObject' '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - communityId - email properties: communityId: type: string email: type: string actionGroupId: type: integer required: true /email-auth/reset-password: post: tags: - Authentication x-handler: email_auth/email_auth_reset_password_controller.js summary: Pass an email reset password request key and new password in exchange for a JWT to include in the header of requests. responses: '200': description: User Info. content: application/json: schema: type: object properties: profile: $ref: '#/components/schemas/Profile' token: type: string actionGroupId: type: integer '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - key - password properties: key: type: string password: type: string required: true /email-verification-request/validate: post: tags: - Authentication x-handler: email_verification_request/email_verification_request_validate_controller.js summary: Validate an email verification request. responses: '200': description: Email verification request is valid. content: application/json: schema: type: object properties: status: type: string description: Status of the next step for the client to perform. enum: - loginCredentialsExist - authenticationRequired - createLoginCredentialsRequired - usersDoNotMatch authenticationOptions: type: array description: If authentication is required before proceeding present what types of login are acceptable (facebook or/and email) items: type: string enum: - facebook - email user: type: object properties: email: type: string fullName: type: string emailVerificationRequest: type: object properties: actionGroupId: type: integer redirectUrl: type: string '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - key properties: key: type: string required: true /email-verification-request/create: post: tags: - Authentication x-handler: email_verification_request/email_verification_request_controller.js x-access: - influencer summary: Create an Email Verification Request responses: '200': description: request is valid content: application/json: schema: $ref: '#/components/schemas/EmptyObject' '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Session expired. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - email properties: email: type: string actionGroupId: type: integer required: true /login-credentials/update: put: tags: - Authentication x-handler: login_credentials/login_credentials_controller.js x-access: - influencer summary: Update existing influencer login credentials. responses: '200': description: User Info. content: application/json: schema: type: object properties: profile: $ref: '#/components/schemas/Profile' '400': description: Missing or invalid parameter. content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Session expired. content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Access forbidden. content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Server error. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: type: object required: - newPassword properties: oldPassword: type: string newPassword: type: string required: true /v1/api-key/login: post: operationId: loginAdmin responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BasicAuthPostResponse' '400': description: Error content: application/json: schema: $ref: '#/components/schemas/ValidateErrorJSON' '403': description: Error content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '500': description: Server Error content: application/json: schema: $ref: '#/components/schemas/ServerError' tags: - Authentication requestBody: content: application/json: schema: $ref: '#/components/schemas/BasicAuthPostRequest' required: true /v1/auth/facebook/exchange-code-for-token: post: operationId: exchangeCodeForToken responses: '200': description: OK content: application/json: schema: properties: accessToken: type: string token: type: string required: - accessToken - token type: object '400': description: Error content: application/json: schema: $ref: '#/components/schemas/ValidateErrorJSON' '403': description: Error content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Error content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '500': description: Server Error content: application/json: schema: $ref: '#/components/schemas/ServerError' description: 'exchangeCodeForToken Exchange a Facebook access code for a token Used as part of the connecting a social profile on the Community App FE requires a Facebook access token prior to connecting a social profile in order to fetch the available pages from the FB API Because of how we are using satellizer on the FE to manage the OAuth flow, we are required to return our own token as part of this response This endpoint requires the user to be authenticated and returns the existing api key as the token' tags: - Authentication requestBody: content: application/json: schema: $ref: '#/components/schemas/FacebookAccessCodeExchangeRequest' required: true /v1/api-key/swap-app: post: operationId: swapCommunity responses: '200': description: Authorization info content: application/json: schema: $ref: '#/components/schemas/SwapAppPostResponse' '400': description: Missing or Invalid Parameter content: application/json: schema: $ref: '#/components/schemas/ValidateErrorJSON' '403': description: Access forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '500': description: Server Error content: application/json: schema: $ref: '#/components/schemas/ServerError' tags: - Authentication requestBody: content: application/json: schema: $ref: '#/components/schemas/SwapAppRequestBody' required: true /v1/reset-password: get: operationId: getResetKey responses: '200': description: Email Sent to Connected Account content: application/json: schema: $ref: '#/components/schemas/TSOAEmptyObject' '400': description: Missing/invalid parameter content: application/json: schema: $ref: '#/components/schemas/ValidateErrorJSON' '403': description: Access forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: The resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ServerError' tags: - Authentication parameters: - in: query name: email required: true schema: type: string - in: query name: hostname required: false schema: type: string post: operationId: resetPassword responses: '200': description: Password Changed content: application/json: schema: $ref: '#/components/schemas/TSOAEmptyObject' '400': description: Missing/invalid parameter content: application/json: schema: $ref: '#/components/schemas/ValidateErrorJSON' '403': description: Access forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: The resource does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundError' '500': description: Server error content: application/json: schema: $ref: '#/components/schemas/ServerError' tags: - Authentication requestBody: content: application/json: schema: $ref: '#/components/schemas/PostRequestBody' required: true components: schemas: MembershipRejection: type: object description: Passed when an influencer does not meet the entrance criteria for the community. properties: redirectLink: type: string rejectReason: type: string missingCriteria: type: array items: type: string ServerError: properties: message: type: string enum: - Server Error details: properties: {} additionalProperties: additionalProperties: true type: object required: - message - details type: object additionalProperties: false InstagramConnectionInfo: type: object properties: id: type: integer description: Instagram Profile Id primaryAccount: type: boolean expiresAt: type: string format: date-time description: The date by which the client should re-prompt the either reconnection flow. platformExpiresAt: type: string format: date-time description: The date by which the client should re-prompt the Instagram Platform connection flow. businessExpiresAt: type: string format: date-time description: The date by which the client should re-prompt the Instagram Business connection flow. handle: type: string description: Client's Instagram account handle profilePicture: type: string description: Client's Instagram profile picture PostRequestBody: properties: email: type: string password: type: string resetKey: type: string required: - email - password - resetKey type: object additionalProperties: false SwapAppRequestBody: properties: communityId: type: string required: - communityId type: object additionalProperties: false EmptyObject: type: object properties: {} TSOAEmptyObject: properties: {} type: object additionalProperties: false Blog: properties: globalUserId: type: - number - 'null' format: double language: type: - string - 'null' name: type: - string - 'null' platform: type: - string - 'null' url: type: - string - 'null' type: object additionalProperties: false Profile: type: object properties: firstName: type: string lastName: type: string email: type: string emailIsVerified: type: boolean facebookExternalId: type: string membershipId: type: integer globalUserId: type: integer isNewMember: type: boolean location: type: string becameMemberAt: type: string format: date-time connectedAccounts: type: object properties: facebook: $ref: '#/components/schemas/FacebookConnectionInfo' twitter: $ref: '#/components/schemas/TwitterConnectionInfoDeprecated' instagram: $ref: '#/components/schemas/InstagramConnectionInfo' pinterest: $ref: '#/components/schemas/PinterestConnectionInfo' blog: $ref: '#/components/schemas/Blog' emailAccounts: type: array items: $ref: '#/components/schemas/EmailAccount' tiktok: $ref: '#/components/schemas/TikTokConnectionInfo' connectedAccountsCollection: type: object properties: facebook: type: array items: $ref: '#/components/schemas/FacebookConnectionInfo' instagram: type: array items: $ref: '#/components/schemas/InstagramConnectionInfo' tiktok: type: array items: $ref: '#/components/schemas/TikTokConnectionInfo' referralSlug: type: string referralCount: type: integer loginCredentialsExist: type: boolean memberSelectedEthnicities: type: array items: type: object properties: ethnicGroup: type: string ethnicGroupDescription: type: string TikTokConnectionInfo: type: object properties: primaryAccount: type: boolean expiresAt: type: string format: date-time description: The date by which the client should re-prompt the TikTok connection flow. handle: type: string description: Client's TikTok account handle profilePicture: type: string description: Client's TikTok profile picture SwapAppPostResponse: properties: token: type: string required: - token type: object additionalProperties: false PinterestConnectionInfo: type: object properties: expiresAt: type: string format: date-time description: The date by which the client should re-prompt the Pinterest connection flow. handle: type: string description: Client's Pinterest account handle profilePicture: type: string description: Client's Pinterest profile picture FacebookAccessCodeExchangeRequest: properties: redirectUri: type: string code: type: string required: - redirectUri - code type: object Error: type: object properties: type: type: string description: A key representing the type of error that has occurred. error: type: string description: A static description of the type of error. params: type: array description: For errors invovling parameters, this is an array containing the invalid parameters. items: type: string keys: type: array items: type: - string - object artifactLinks: $ref: '#/components/schemas/LinksDeprecated' parent: type: object properties: type: type: string description: A key representing the type of error generated by a request to an external API. error: type: string description: A static description of the parent error. NotFoundError: properties: message: type: string enum: - Resource Not Found details: properties: {} additionalProperties: additionalProperties: true type: object required: - message - details type: object additionalProperties: false FacebookConnectionInfo: $ref: '#/components/schemas/FacebookProfileDeprecated' FacebookProfileDeprecated: type: object properties: id: type: integer facebookExternalId: type: string name: type: string link: type: string picture: type: string reach: type: integer averageLikes: type: integer averageComments: type: integer averageEngagements: type: integer engagementRate: type: number type: type: string available: type: boolean active: type: boolean expiresAt: type: string format: date-time facebookUser: type: object properties: isExpired: type: boolean TwitterConnectionInfoDeprecated: type: object properties: expiresAt: type: string format: date-time description: The date by which the client should re-prompt the Twitter connection flow. handle: type: string description: Client's Twitter account handle profilePicture: type: string description: Client's Twitter profile picture ForbiddenError: properties: message: type: string enum: - Access Forbidden details: properties: {} additionalProperties: additionalProperties: true type: object required: - message - details type: object additionalProperties: false ValidateErrorJSON: properties: message: type: string enum: - Validation failed details: properties: {} additionalProperties: additionalProperties: true type: object required: - message - details type: object additionalProperties: false LinksDeprecated: type: object x-access: - anonymous - influencer properties: normal: type: string description: A normal link to an entity. deep: type: string description: A deep link to the entity. BasicAuthPostResponse: properties: token: type: string communityId: type: string required: - token - communityId type: object BasicAuthPostRequest: properties: password: type: string email: type: string required: - password - email type: object EmailAccount: type: object properties: email: type: string securitySchemes: apiKey: type: apiKey name: api-key in: header