Paul and Barnabas are both called apostles in the book of Acts:
8 And in Lystra a certain man without strength in his feet was sitting, a cripple from his mother’s womb, who had never walked. 9 This man heard Paul speaking. Paul, observing him intently and seeing that he had faith to be healed, 10 said with a loud voice, “Stand up straight on your feet!” And he leaped and walked. 11 Now when the people saw what Paul had done, they raised their voices, saying in the Lycaonian language, “The gods have come down to us in the likeness of men!” 12 And Barnabas they called Zeus, and Paul, Hermes, because he was the chief speaker. 13 Then the priest of Zeus, whose temple was in front of their city, brought oxen and garlands to the gates, intending to sacrifice with the multitudes.
14 But when the apostles Barnabas and Paul heard this, they tore their clothes and ran in among the multitude, crying out 15 and saying, “Men, why are you doing these things? We also are men with the same nature as you, and preach to you that you should turn from these useless things to the living God, who made the heaven, the earth, the sea, and all things that are in them, 16 who in bygone generations allowed all nations to walk in their own ways. 17 Nevertheless He did not leave Himself without witness, in that He did good, gave us rain from heaven and fruitful seasons, filling our hearts with food and gladness.” 18 And with these sayings they could scarcely restrain the multitudes from sacrificing to them. -Acts 14:8-18 (NKJV)
The Holy Spirit had set them apart earlier in Antioch:
1 Now in the church that was at Antioch there were certain prophets and teachers: Barnabas, Simeon who was called Niger, Lucius of Cyrene, Manaen who had been brought up with Herod the tetrarch, and Saul. 2 As they ministered to the Lord and fasted, the Holy Spirit said, “Now separate to Me Barnabas and Saul for the work to which I have called them.” 3 Then, having fasted and prayed, and laid hands on them, they sent them away. -Acts 13:1-3 (NKJV)
So neither Paul nor Barnabas were self-proclaimed apostles, but were set apart by the Holy Spirit. Note that even though Acts refers to them as apostles, there is still a distinction made between them and the other twelve apostles, with one example being in Acts 15 where Paul and Barnabas go back to Jerusalem to consult with the apostles and elders about the matter of circumcision:
1 And certain men came down from Judea and taught the brethren, “Unless you are circumcised according to the custom of Moses, you cannot be saved.” 2 Therefore, when Paul and Barnabas had no small dissension and dispute with them, they determined that Paul and Barnabas and certain others of them should go up to Jerusalem, to the apostles and elders, about this question. -Acts 15:1-2 (NKJV)
The apostles consisted of those who were with Jesus from the start:
15 And in those days Peter stood up in the midst of the disciples (altogether the number of names was about a hundred and twenty), and said, 16 “Men and brethren, this Scripture had to be fulfilled, which the Holy Spirit spoke before by the mouth of David concerning Judas, who became a guide to those who arrested Jesus; 17 for he was numbered with us and obtained a part in this ministry.”
21 “Therefore, of these men who have accompanied us all the time that the Lord Jesus went in and out among us, 22 beginning from the baptism of John to that day when He was taken up from us, one of these must become a witness with us of His resurrection.”
23 And they proposed two: Joseph called Barsabas, who was surnamed Justus, and Matthias. 24 And they prayed and said, “You, O Lord, who know the hearts of all, show which of these two You have chosen 25 to take part in this ministry and apostleship from which Judas by transgression fell, that he might go to his own place.” 26 And they cast their lots, and the lot fell on Matthias. And he was numbered with the eleven apostles. -Acts 1:15-17, 21-26 (NKJV)
The word “apostle” does contain a somewhat wider sense at times than just the twelve apostles. However, from the information gleaned from the book of Acts, these were special circumstances where the Holy Spirit set apart certain individuals. The twelve foundations containing the names of the twelve apostles of the Lamb in Revelation 21:14 would consist of the eleven plus Matthias, who filled the place left vacant by Judas, who had been with Jesus since the beginning, and as Acts 1:24-26 shows, was chosen by the Lord.